cancel
Showing results for 
Search instead for 
Did you mean: 

Show top n sum of a dimension in a single cell

Former Member
0 Kudos

Hi experts,

is it possible to show the sum of top n values in a single cell?

example:

Table shows (top 3)

USA___________180

Germany_______150

Italy___________100

Sum___________430

single cell should show

430

Accepted Solutions (1)

Accepted Solutions (1)

arijit_das
Active Contributor
0 Kudos

Create a variable "rank" as

 =Rank([Measure]) 

Then, in the standalone cell, enter the formula:


=Sum([Measure] Where ([rank] < 4))

Former Member
0 Kudos

Thank you for your answer.

But with your suggestion, it only shows overall sum.

Do I have to refer to a dimension?

arijit_das
Active Contributor
0 Kudos

you may need to refer to dimensions in the rank formula as per requirement. First check if the rank is calculated correctly or not. then use the second formula.

Former Member
0 Kudos

I need only one formula.

=Sum([measure] Where (Rank([keyfigure];[dimension]) <= 5))

Now it´s working fine. But thanks for the first tip!

Answers (0)