CUBEKPIMEMBER Function

Excel 2007+

Summary

The CUBEKPIMEMBER function retrieves key performance indicator (KPI) properties from OLAP cubes and displays them in Excel worksheets. Essential for business intelligence dashboards tracking organizational metrics like profit margins, sales targets, and performance trends.

Syntax

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

Parameters

Parameter Type Required Description
connection string Yes Text string identifying the cube connection in the workbook
kpi_name string Yes Exact name of the KPI as defined in the Analysis Services cube
kpi_property string Yes Specifies which KPI element to return: KPIValue=1, KPIGoal=2, KPIStatus=3, KPITrend=4, KPIWeight=5, KPICurrentTimeMember=6
caption string No Custom display text shown in the cell instead of technical KPI names

Using the CUBEKPIMEMBER Function

CUBEKPIMEMBER transforms raw OLAP cube data into actionable KPI insights directly within Excel spreadsheets. Use it to build executive dashboards displaying real-time performance metrics against targets, with visual indicators for trends and status.

Common CUBEKPIMEMBER Examples

Retrieve Current Sales KPI Value

=CUBEKPIMEMBER("Sales Cube","Monthly Gross Profit KPI", "KPIValue")

Displays the actual monthly gross profit value from the Sales cube KPI.

Show KPI Goal with Custom Caption

=CUBEKPIMEMBER("Sales Cube","Monthly Gross Profit KPI", "KPIGoal", "Profit Target")

Returns the profit target value and labels it as 'Profit Target' in the cell.

Display KPI Trend Status

=CUBEKPIMEMBER("Sales Cube","Quarterly Sales KPI", "KPITrend")

Shows whether quarterly sales are improving, declining, or stable.

Frequently Asked Questions

Requires Microsoft SQL Server 2005 Analysis Services or later OLAP cubes.

Normal behavior while Excel retrieves KPI data from the Analysis Services server.

Yes, but requires a valid cube connection configured in Data > Connections.

Common Errors and Solutions

#NAME? error

Cause: Invalid connection name or OLAP server unavailable

Solution: Verify connection exists in Data > Existing Connections and server is running

#N/A error

Cause: Invalid kpi_name or kpi_property values

Solution: Check exact KPI names in cube browser and use correct property constants

#GETTING_DATA… persists

Cause: Slow server response or network timeout

Solution: Check Analysis Services server status and network connectivity

Notes

  • Displays #GETTING_DATA… temporarily during data retrieval
  • Use as member_expression in CUBEVALUE for KPI calculations
  • KPIValue property shows only kpi_name in the cell
  • Session-based objects may cause #N/A when sharing connections

Compatibility

Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365

Not available in: Excel 2003 and earlier

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+