Forum Discussion
Multiple Top N in the x-axis
- 5 years ago
You can create a single disconnected table like this one called 'TopNTable'.
Label TopNValue
Top 5 5 Top 10 10 Top 25 25 You can then use the Label column in your visual, and use MIN(TopNTable[TopNValue]) in a variable, and then use that variable in your TOPN measure expression
Dynamic TopN Measure =
VAR selTopN =
MIN ( TopNTable[TopNValue] )
RETURN
CALCULATE (
[your measure],
TOPN ( selTopN, DISTINCT ( Table[Clients] ), [your measure], DESC )
)Pat
Thanks for the reply, mahoneypat
Would I need to create a disconnected table for each TopN? so 4 disconnected tables with sum of sales for top 5, top 10 clients etc?
Thanks,
Gus
You can create a single disconnected table like this one called 'TopNTable'.
| Label |
TopNValue |
| Top 5 | 5 |
| Top 10 | 10 |
| Top 25 | 25 |
You can then use the Label column in your visual, and use MIN(TopNTable[TopNValue]) in a variable, and then use that variable in your TOPN measure expression
Dynamic TopN Measure =
VAR selTopN =
MIN ( TopNTable[TopNValue] )
RETURN
CALCULATE (
[your measure],
TOPN ( selTopN, DISTINCT ( Table[Clients] ), [your measure], DESC )
)
Pat