Excel like a finance pro.
← The libraryPractice · 2 questions →
Cube function
CUBERANKEDMEMBER
Returns the nth member of a set from an OLAP cube, like the top-selling product.
Rarely usedDifficulty 1650 · ExpertUsage rank #519 of 520
When to use it
The nth member of a cube set: top-N reports driven by a sorted CUBESET.
The shape of it
- Syntax
=CUBERANKEDMEMBER(connection, set_expression, rank, [caption])
Worked examples
Top seller
=CUBERANKEDMEMBER("Sales",$A$1,1) → Widget Pro
A1 holds a CUBESET sorted by sales descending; rank 1 is the best seller.
Runner-up
=CUBERANKEDMEMBER("Sales",$A$1,2) → Doohickey
Second place.
Full ranking
=CUBERANKEDMEMBER("Sales",$A$1,ROW(A1)) → ranked list
Copied down, produces the whole ranking.
Worth knowing
- The set must be sorted in CUBESET for ranks to mean anything.
- Pair with CUBEVALUE to show each member's figure.
- Rank beyond the set size returns #N/A.
Where it goes wrong
- #N/A when the rank exceeds the set count.
- Slow on very large sets; limit with TopCount in the set expression.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.