Forum Discussion
Sort Top 10 & Others table
- 6 years ago
Anonymous , not very clear, see if this can help
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
top 5 with other
https://community.powerbi.com/t5/Desktop/Top-5-and-others/td-p/165945
For Rank Refer 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 - 6 years ago
Hi Anonymous
Seems like you'd wanna get the TOPN based on different category : Customer/Others, and show it in the matrix/table. but the category should be ranked as you wish by Custmer>Others, right?
You might refer to rank by multiple columns:
I modified the measure as:
Measure 4 = VAR t = SUMMARIZE ( ALLSELECTED ( 'Table (4)' ), 'Table (4)'[Code Group], 'Table (4)'[Name], 'Table (4)'[Rank],'Table (4)'[Sales] ) RETURN COUNTROWS ( FILTER ( t, ISONORAFTER ( 'Table (4)'[Code Group], SELECTEDVALUE ( 'Table (4)'[Code Group]), ASC, 'Table (4)'[Sales],SELECTEDVALUE('Table (4)'[Sales]),ASC ) ) )That the code group ranks by asc, and sales ranks by desc: