Please note javascript is required for full website functionality.


A to Z of Excel Functions: The CUBEKPIMEMBER Function

2 March 2018

Welcome back to our regular A to Z of Excel Functions blog. Today we look at the CUBEKPIMEMBER function.


When the workbook is connected to a Microsoft SQL Server 2005 Analysis Services or later data source, this function returns a key performance indicator (KPI) property and displays the KPI name in the cell. A KPI is a quantifiable measurement, such as monthly gross profit or quarterly employee turnover, that is used to monitor an organisation's performance.

The CUBEKPIMEMBER function employs the following syntax to operate:

CUBEKPIMEMBER(connection, kpi_name, kpi_property, [caption])

The CUBEKPIMEMBER function has the following arguments:

  • connection: this is required and represents a text string of the name of the connection to the cube
  • kpi_name: this is also required. This is a text string of the name of the KPI in the cube
  • kpi_property: again, this is required. This is the KPI component returned and can be one of the following:
  • caption: this is optional.  This represents an alternative text string that is displayed in the cell instead of kpi_name and kpi_property.

It should be further noted that: 

  • the CUBEKPIMEMBER function is supported only when the workbook is connected to a Microsoft SQL Server 2005 Analysis Services or later data source
  • when the CUBEKPIMEMBER function evaluates, it temporarily displays a "#GETTING_DATA…" message in the cell before all of the data is retrieved
  • to use the KPI in a calculation, specify the CUBEKPIMEMBER function as a member_expression argument in the CUBEVALUE function
  • if the connection name is not a valid workbook connection that is stored in the workbook, CUBEKPIMEMBER returns an #NAME? error value.  If the Online Analytical Processing (OLAP) server is not running, not available or returns an error message, CUBEKPIMEMBER returns a #NAME? error value
  • CUBEKPIMEMBER returns an #N/A error value when kpi_name or kpi_property is invalid
  • if you specify KPIValue for kpi_property, only kpi_name is displayed in the cell
  • CUBEKPIMEMBER may return an #N/A error value if you reference a session-based object, such as a calculated member or named set, in a PivotTable when sharing a connection, and that PivotTable is deleted or you convert the PivotTable to formulae (on the ‘Options’ tab in the Ribbon, in the ‘Tools’ group, click ‘OLAP Tools’, and then click ‘Convert to Formulas’).

Please see my examples below:


=CUBEKPIMEMBER("Sales","MySalesKPI", KPIGoal,"Sales KPI Goal")

We’ll continue our A to Z of Excel Functions soon.  Keep checking back – there’s a new blog post every business day.