Forum Discussion
Top N in a matrix
Hello everyone
I have an array that in the rows has 3 categories. followed that row comes a sub row of that category that are the items of the category( they are more than 200 item per category). What I need is to show me the top 10 item of each category with the greatest breakages (I have the breakages of each product as well).
@CLCastroEn , see this
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
For range See these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
2 Replies
- AllisonKennedy
Community Champion
You could try this if you want a static ranking (same rank regardless of slicer selections):
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
Or this if you want dynamic rankings that update based on your slicer selections:
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures - amitchandak
Super User
@CLCastroEn , see this
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
For range See these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415