CUBERANKEDMEMBER function

Category: Cube
Introduced: Excel 365

Summary

Returns the nth, or ranked, member in a set. Use to return one or more elements in a set, such as the top sales performer or top 10 students.

Syntax

CUBERANKEDMEMBER(connection, set_expression, rank, [caption]) The CUBERANKEDMEMBER function syntax has the following arguments:
• Connection Required. A text string of the name of the connection to the cube.
• Set_expression Required. A text string of a set expression, such as "{[Item1].children}". Set_expression can also be the CUBESET function, or a reference to a cell that contains the CUBESET function.
• Rank Required. An integer value specifying the top value to return. If rank is a value of 1, it returns the top value, if rank is a value of 2, it returns the second most top value, and so on. To return the top 5 values, use CUBERANKEDMEMBER five times, specifying a different rank, 1 through 5, each time.
• Caption Optional. A text string displayed in the cell instead of the caption, if one is defined, from the cube.

Example

=CUBERANKEDMEMBER("Sales",$D$4,1,"Top Month")
=CUBERANKEDMEMBER("Sales",CUBESET("Sales","Summer","[2004].[June]","[2004].[July]","[2004].[August]"),3,"Top Month")

Microsoft Support Page

https://support.microsoft.com/en-us/office/cuberankedmember-function-07efecde-e669-4075-b4bf-6b40df2dc4b3

Back to Functions