Note: The other languages of the website are Google-translated. Back to English

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

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save

80%
time for you.

  • Designed for
    1500
    work scenarios, helps you solve
    80%
     Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL