Forum Discussion
Top N value based on category
- 4 years ago
Hi, Anonymous ;
You could create a flag measure.
Flag = IF( RANKX(FILTER(ALLSELECTED('Table'),[Category]=MAX('Table'[Category])),CALCULATE(SUM('Table'[Value])),,DESC)<=2,1)Then apply it into filter.
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous ;
You could create a flag measure.
Flag = IF( RANKX(FILTER(ALLSELECTED('Table'),[Category]=MAX('Table'[Category])),CALCULATE(SUM('Table'[Value])),,DESC)<=2,1)
Then apply it into filter.
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Can we create a button that we can use to select top 2 once clicked rather than once the category selection, please?
- v-yalanwu-msft4 years agoCommunity Support
Hi, Anonymous ;
The button is not a filter, but the button can link to other pages. Can you share the scene display you wish to export? Is the button fixed to the top 2 or can you select the top 3, top 4...
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.