Forum Discussion

Sylvine_Wyz's avatar
Sylvine_Wyz
Helper IV
6 years ago
Solved

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 top 10 became 11 or more.

 

Can you help me please ?

 

Thanks in advance. 

 

Have a nice day

 

  • 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 = RANX
     
    Reference Image:
     
    Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
     

5 Replies