Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Roym
Helper IV
Helper IV

Show only top 8 in table

I have a table visual in my report that has the columns 'Name'  and 'Rating'. The column 'Rating' will have values from 1-5. There will be duplicates so you can have multiple 1's, 2's, etc. When I apply the filter 'Top N' on my visual and filter on 'Rating'  I choose 'Average' as that is the best I guess in this case? But when I then say I want to have the 'Top 8' it will show more then 8 when for example you have 4 times a '1', 3 times a '2' and 3 times a '3', it will then show 10 rows. Is there a way it only show 8 values in this case? (I understand why it happens as it can not determine which '3' rows to include/exclude but in my case it doesn't matter which one it takes)

 

NameRating
Name 13
Name 21
Name 32
Name 41
Name 52
Name 63
Name 72
Name 81
Name 91
Name 103

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

pls try this

Measure = max('Table'[rating])
Measure 2 = max('Table'[Name])
rank = rankx(all('Table'),[Measure],,ASC)+rankx(all('Table'),[Measure 2],,ASC)/10
rank2 = rankx(all('Table'),[rank],,ASC)
 
then apply the rank 2 in the table visual
 
11.PNG
 
pls see the attachment below
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

pls try this

Measure = max('Table'[rating])
Measure 2 = max('Table'[Name])
rank = rankx(all('Table'),[Measure],,ASC)+rankx(all('Table'),[Measure 2],,ASC)/10
rank2 = rankx(all('Table'),[rank],,ASC)
 
then apply the rank 2 in the table visual
 
11.PNG
 
pls see the attachment below
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Great, thanks!!!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.