Forum Discussion
Anonymous
8 years agoNot applicable
Top N with multiple drill down.
I have the following table:
Name Number Letter Value
| Carlos | 1 | A | 80 |
| Carlos | 1 | B | 70 |
| Carlos | 2 | A | 60 |
| Carlos | 2 | B | 50 |
| Henrique | 1 | A | 40 |
| Henrique | 1 | B | 30 |
| Henrique | 2 | A | 20 |
| Henrique | 2 | B | 10 |
| Macias | 1 | A | 10 |
| Macias | 1 | B | 9 |
| Macias | 2 | A | 8 |
| Macias | 2 | B | 7 |
And the folowing matrix visual and slicer:
To create the rank, i used this formua:
Rank =
IF(
ISFILTERED(Table1[Level Letter]);
RANKX(ALLSELECTED(Table1[Level Letter]); CALCULATE(SUM(Table1[Value])); ; DESC; Dense);
IF(
ISFILTERED(Table1[Level Number]);
RANKX(ALLSELECTED(Table1[Level Number]); CALCULATE(SUM(Table1[Value])); ; DESC; Dense);
RANKX(ALLSELECTED(Table1[Level Name]); CALCULATE(SUM(Table1[Value])); ; DESC; Dense)
)
)
And get the selected value of the top N slicer I am using this code:
SelectedValue =
IF(
HASONEVALUE('TopN'[Show N]);
SELECTEDVALUE('TopN'[ID]);
-1
)
Now I need a way to show only the Top N values and subvalues. For example:
Show Top 1:
Show Top 2:
But I can not find a way to do so.
1 Reply
- v-chuncz-msftCommunity Support
Anonymous,
You may take a look at the following post.