Microsoft Excel Tutorials

Excel - Cube Functions

Excel CUBE Functions - Syntax and Examples

CUBE Functions in Excel

CUBEKPIMEMBER

The CUBEKPIMEMBER function returns a Key Performance Indicator (KPI) property from the cube, such as value, goal, or status.

Syntax:

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

Example:

=CUBEKPIMEMBER("PowerPivot Data", "Sales KPI", "Value")

Result: Returns the value measure of the KPI "Sales KPI".

CUBEMEMBER

The CUBEMEMBER function returns a member or tuple from the cube. It is used to extract a specific dimension value.

Syntax:

=CUBEMEMBER(connection, member_expression, [caption])

Example:

=CUBEMEMBER("PowerPivot Data", "[Date].[Year].&[2023]")

Result: Retrieves the year 2023 from the Date hierarchy.

CUBEMEMBERPROPERTY

The CUBEMEMBERPROPERTY function returns the value of a property for a given member in the cube.

Syntax:

=CUBEMEMBERPROPERTY(connection, member_expression, property)

Example:

=CUBEMEMBERPROPERTY("PowerPivot Data", "[Product].[Category].&[1]", "MEMBER_CAPTION")

Result: Returns the display caption of the product category with ID 1.

CUBERANKEDMEMBER

The CUBERANKEDMEMBER function returns the nth or ranked member of a set, which is useful for top/bottom analysis.

Syntax:

=CUBERANKEDMEMBER(connection, set_expression, rank, [caption])

Example:

=CUBERANKEDMEMBER("PowerPivot Data", "[Product].[Product Name].Members", 1)

Result: Returns the top product in the Product Name hierarchy.

CUBESET

The CUBESET function defines a set of members or tuples from the cube by evaluating a set expression. It can be used for filtering or ranking purposes.

Syntax:

=CUBESET(connection, set_expression, [caption], [sort_order], [sort_by])

Example:

=CUBESET("PowerPivot Data", "[Product].[Category].Children")

Result: Returns all children of the Product Category dimension.

CUBESETCOUNT

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

Syntax:

=CUBESETCOUNT(set)

Example:

=CUBESETCOUNT(A2)

Result: If cell A2 contains a valid CUBESET, returns how many items are in that set.

CUBEVALUE

The CUBEVALUE function returns the value of a cube cell based on member expressions provided. You can supply one or more dimensions.

Syntax:

=CUBEVALUE(connection, [member_expression1], [member_expression2], ...)

Example:

=CUBEVALUE("PowerPivot Data", "[Measures].[Total Sales]", "[Product].[Category].&[1]")

Result: Returns the total sales for product category ID 1.

Beginner 5 Hours
Excel CUBE Functions - Syntax and Examples

CUBE Functions in Excel

CUBEKPIMEMBER

The CUBEKPIMEMBER function returns a Key Performance Indicator (KPI) property from the cube, such as value, goal, or status.

Syntax:

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

Example:

=CUBEKPIMEMBER("PowerPivot Data", "Sales KPI", "Value")

Result: Returns the value measure of the KPI "Sales KPI".

CUBEMEMBER

The CUBEMEMBER function returns a member or tuple from the cube. It is used to extract a specific dimension value.

Syntax:

=CUBEMEMBER(connection, member_expression, [caption])

Example:

=CUBEMEMBER("PowerPivot Data", "[Date].[Year].&[2023]")

Result: Retrieves the year 2023 from the Date hierarchy.

CUBEMEMBERPROPERTY

The CUBEMEMBERPROPERTY function returns the value of a property for a given member in the cube.

Syntax:

=CUBEMEMBERPROPERTY(connection, member_expression, property)

Example:

=CUBEMEMBERPROPERTY("PowerPivot Data", "[Product].[Category].&[1]", "MEMBER_CAPTION")

Result: Returns the display caption of the product category with ID 1.

CUBERANKEDMEMBER

The CUBERANKEDMEMBER function returns the nth or ranked member of a set, which is useful for top/bottom analysis.

Syntax:

=CUBERANKEDMEMBER(connection, set_expression, rank, [caption])

Example:

=CUBERANKEDMEMBER("PowerPivot Data", "[Product].[Product Name].Members", 1)

Result: Returns the top product in the Product Name hierarchy.

CUBESET

The CUBESET function defines a set of members or tuples from the cube by evaluating a set expression. It can be used for filtering or ranking purposes.

Syntax:

=CUBESET(connection, set_expression, [caption], [sort_order], [sort_by])

Example:

=CUBESET("PowerPivot Data", "[Product].[Category].Children")

Result: Returns all children of the Product Category dimension.

CUBESETCOUNT

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

Syntax:

=CUBESETCOUNT(set)

Example:

=CUBESETCOUNT(A2)

Result: If cell A2 contains a valid CUBESET, returns how many items are in that set.

CUBEVALUE

The CUBEVALUE function returns the value of a cube cell based on member expressions provided. You can supply one or more dimensions.

Syntax:

=CUBEVALUE(connection, [member_expression1], [member_expression2], ...)

Example:

=CUBEVALUE("PowerPivot Data", "[Measures].[Total Sales]", "[Product].[Category].&[1]")

Result: Returns the total sales for product category ID 1.

Related Tutorials

Frequently Asked Questions for Microsoft Excel

Go to View β†’ Freeze Panes to keep a row or column visible while scrolling.

Select data β†’ Click Insert β†’ Chart β†’ Choose a chart type (bar, line, pie, etc.).

=IF(A1>10, "High", "Low") returns "High" if A1 is greater than 10; otherwise, it returns "Low".

Relative (A1): Changes when copied.

Absolute ($A$1): Remains fixed when copied.

Select data β†’ Click Insert β†’ PivotTable β†’ Choose where to place it.

VLOOKUP: Searches vertically in columns.

HLOOKUP: Searches horizontally in rows.

VLOOKUP only searches left to right.
INDEX-MATCH is more flexible and allows searches in any direction.

Click File β†’ Save As, choose a location, enter a filename, and select a format (e.g., .xlsx, .csv).

Select column β†’ Click Data β†’ Text to Columns β†’ Choose delimiter (e.g., comma, space).

Use =SUM(A1:A5) to add values in the range A1 to A5.

Use =COUNTIF(A1:A10, ">50") to count numbers greater than 50 in A1:A10.

Select data β†’ Click Data β†’ Remove Duplicates.

Count numbers: =COUNT(A1:A10)

Count non-empty cells: =COUNTA(A1:A10)

Select cells β†’ Click Conditional Formatting in the Home tab β†’ Choose a rule (e.g., highlight values greater than 50).

#DIV/0! β†’ Division by zero error.
#VALUE! β†’ Invalid data type in formula.
#REF! β†’ Cell reference is missing or deleted.

Click the Pivot Table β†’ Click Refresh under the PivotTable Analyze tab.

Select a cell β†’ Data β†’ Data Validation β†’ Set rules (e.g., allow only numbers or dropdown lists).

Ctrl + C β†’ Copy
Ctrl + V β†’ Paste
Ctrl + Z β†’ Undo
Ctrl + Shift + L β†’ Apply/Remove filter
Ctrl + T β†’ Convert data to a table

Click Review β†’ Protect Sheet, set a password, and select allowed actions.

Excel is a spreadsheet software used for data analysis, calculations, graphing, and automation.

Check for typos in the formula.
Ensure cells referenced contain valid data.
Remove extra spaces in text values.

It searches for a value in the first column of a range and returns a value from another column.

Example: =VLOOKUP(101, A2:C10, 2, FALSE) looks up 101 in column A and returns the corresponding value from column 2.

Use =A1 & " " & B1 or =CONCATENATE(A1, " ", B1).

line

Copyrights © 2024 letsupdateskills All rights reserved