Forum Discussion
DRunner
5 years agoRegular Visitor
Dynamic Top N filter for graph
Hi, I was looking for a solution to my problem when trying to develop a dynamic TopN filter for my report when I stumbled on this post from a few years ago Dynamic Top N filter for graph . I ...
- 5 years ago
Hi, DRunner
I modify the measure, because column won't change when using slicers. You need to use allexcept funciton.
Measure = RANKX(ALL('Dataset 1'[CODE]),CALCULATE([sumLBS],ALLEXCEPT('Date','Date'[Year])),,DESC)Measure3 = IF ( ISFILTERED ( 'Top N'[TopN] ), IF ( [Measure] <= SELECTEDVALUE ( 'Top N'[TopNValues] ), 1, 0 ), 1 )Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-janeyg-msft
5 years agoCommunity Support
Hi, DRunner
I modify the measure, because column won't change when using slicers. You need to use allexcept funciton.
Measure = RANKX(ALL('Dataset 1'[CODE]),CALCULATE([sumLBS],ALLEXCEPT('Date','Date'[Year])),,DESC)Measure3 =
IF (
ISFILTERED ( 'Top N'[TopN] ),
IF (
[Measure]
<= SELECTEDVALUE ( 'Top N'[TopNValues] ),
1,
0
),
1
)
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DRunner
5 years agoRegular Visitor
Thank you for your help!