Forum Discussion
Sylvine_Wyz
6 years agoHelper IV
Top 10 and filter
Hi Everybody, I have a problem with the top 10 and the filter. I created a top 10 of EAN's tyre by the quantity. It's correct. But when i add a filter in the visual to filter by agency, the t...
- 6 years ago
Hi Sylvine_Wyz ,
You get more than 10 values with Top 10 filter because of common values and hence power bi by default dense ranks it.
You will need to create a rank column and pull this rank column in top 10 filter.
1. Create a new column with below dax; This column will set bifercation between same values :
Number+Random = 'Table'[number]+RAND()2. Create another column for ranking and this will be pulled in top 10 filter:RANX =RANKX('Table','Table'[Number+Random],,1)Note:Names in my above example,> Table Name = Table> Field to filter top 10 = Number> Column 1 created = Number+Random> Column 2 created = RANXReference Image:Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
Greg_Deckler
6 years agoCommunity Champion
Sylvine_Wyz - You might find this useful: https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
and
https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Mythical-DAX-Index/td-p/1093214