Skip to main content

Excel CUBEKPIMEMBER Function

The CUBEKPIMEMBER function returns the key performance indicator (KPI) property and displays the KPI name in the cell.

cubekpimember function 1


Syntax

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


Arguments

  • connection (required): A text string of the name of the connection tthe data model (cube).
  • kpi_name (required): A text string of the name of the KPI in the cube.
  • kpi_property (required): The KPI component returned and can be one of the enumerated constants in the following table:
  • Integer Enumerated constant Description
    1 KPIValue The actual value
    2 KPIGoal A target value
    3 KPIStatus The state of the KPI at a specific moment in time
    4 KPITrend A measure of the value over time
    5 KPIWeight A relative importance assigned to the KPI
    6 KPICurrentTimeMember A temporal context for the KPI
  • caption (optional): A text string that overwrites the kpi_name and kpi_property and displays in the cell.

Return Value

The CUBEKPIMEMBER function returns a KPI property.


Function Notes

  • The #GETTING_DATA… message is displayed while the data is being retrieved.
  • To use KPI in a calculation, nest the CUBEKPIMEMBER function as a member_expression argument in the CUBEVALUE function.
  • CUBEKPIMEMBER returns the #NAME? error value if:
    • connection is not a valid workbook connection stored in the workbook, e.g., ThisWorkbookDataModel;
    • Online Analytical Processing (OLAP) server is unavailable, not running, or returned an error message.
  • CUBEKPIMEMBER returns the #N/A error value if:
    • kpi_name or kpi_property is not valid;
    • reference a session-based object in pivot table when sharing a connection and the pivot table is deleted or to be converted to formulas.
  • Arguments of CUBEKPIMEMBER, except kpi_property and cell references, should be closed with double quotes ("").

Example

I have a table here named “sales2021” which includes the information of sales and rating of different products of 2 categories across the year 2021. To use the CUBEKPIMEMBER function to get the total sales of both categories in 2021, you should first complete the following two steps:

  1. Add the data from this table to the Data Model in the existing workbook, its name will always be "ThisWorkbookDataModel".
  2. Add a KPI to your Data Model.
    1. Go to Data > Data Tools > Manage Data Model. Select the tab on the bottom of your specific data. Here I will select sale2021.
    2. Perform the necessary calculations. In this example, I will apply AutoSum on Sales column by first selecting the sales column and then click on AutoSum. You will see the Sum of Sales 2 measure is created as the below screenshot shown.
      cubekpimember function 2
    3. Repeat the above step but apply Average from the drop-down list after you clicking the drop-down arrow besides AutoSum to create an Average measure.
      cubekpimember function 3
    4. Right-click on the Sum measure and then select Create KPI. In the pop-up dialog, choose the Average of Sales 2 Measure in the drop-down menu, and then click OK.
      cubekpimember function 4

Now the KPI is available in your data model, please copy or enter the formula below in the cell G21, and press Enter to get the result:

=CUBEKPIMEMBER("ThisWorkbookDataModel","Sum of Sales 2",1, "Total sales")

cubekpimember function 5

√ Note: You can get the corresponding KPI value by using the CUBEVALUE function in the cell H21:

=CUBEVALUE("ThisWorkbookDataModel","[Measures].[Sum of Sales 2]")


Related functions

Excel CUBEVALUE Function

The CUBEVALUE function returns an aggregated value from a cube filtered by multiple member_expression arguments.

Excel CUBEMEMBER Function

The CUBEMEMBER function retrieves a member or tuple from a cube if it exists. Otherwise, a #N/A error value will be returned.

Excel CUBESET Function

The CUBESET function defines a calculated set of members or tuples by sending a set expression to the cube on the server. The function can extract all unique values from a set expression, and it offers options for sorting.

Excel CUBESETCOUNT Function

The CUBESETCOUNT function returns the number of items in a set.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations