CUBEKPIMEMBER function
CUBEKPIMEMBER pulls a key performance indicator defined in an OLAP cube, such as its goal or status, into a worksheet. It needs an OLAP cube or Data Model connection.
Example
=CUBEKPIMEMBER("Sales","Revenue KPI",1)
Expected result: n/a Not yet checked in desktop Excel
Syntax
CUBEKPIMEMBER(connection, kpi_name, kpi_property, [caption])
Arguments in [square brackets] are optional.
-
connection(required) - Name of the cube connection, as text.
-
kpi_name(required) - Name of the KPI, as text.
-
kpi_property(required) - Which part of the KPI to return (value, goal, status, trend and so on).
-
caption(optional) - Text shown in the cell instead of the KPI name.
Returns: A KPI property, with the KPI name displayed in the cell.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=CUBEKPIMEMBER("NoSuchConnection","MyKPI",1) | #N/A | Unknown connection name |
=CUBEKPIMEMBER("ThisWorkbookDataModel","MyKPI",1) | #N/A | ThisWorkbookDataModel without a model |
=CUBEKPIMEMBER("","MyKPI",1) | #N/A | Empty connection string |
=CUBEKPIMEMBER(1,"MyKPI",1) | #N/A | Connection is a number |
=CUBEKPIMEMBER("NoSuchConnection","MyKPI",9) | #N/A | Kpi property 9 (invalid) |
=CUBEKPIMEMBER(Data!D1,"MyKPI",1) | #N/A | Connection from blank cell |
The Data sheet these formulas read
A cell that starts with = holds that formula.
D
1
Data
Watch out for
- The KPI must exist in the cube; otherwise you get #N/A.
Where it works
- Excel
- CUBEKPIMEMBER is in every version of Excel from 2007 on. Needs an OLAP cube or Data Model connection; Windows desktop Excel only for most uses.
- Google Sheets
- No direct equivalent. No cube support in Google Sheets.
Part of Cube functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .