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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Top N products by highest score

Hello!

 

I have a table with products and their rating score, like this:

BobBnks_0-1666625202322.png

 

I want to show the top 10 products according to their highest score.

 

I am struggling to find the correct dax that will return me the highest score for each distinct product, and then use it in a visualisation. Top N doesn't show the top 10 products either, it will only arrange the full Product list in to descending order when used in a visualisation.


Does anyone know the simplest way to do this?

 

Thank you in advance.

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please create a new column:

RANK = RANKX('Table',[Sore],,DESC,Skip)

vyadongfmsft_0-1666861657957.png

 

Create a table and put RANK field into filters, you can show the top 10 products according to their highest score.

vyadongfmsft_1-1666861698562.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yadongf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please create a new column:

RANK = RANKX('Table',[Sore],,DESC,Skip)

vyadongfmsft_0-1666861657957.png

 

Create a table and put RANK field into filters, you can show the top 10 products according to their highest score.

vyadongfmsft_1-1666861698562.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hello, 
first start by created the max measure:

max of eac prodcut = CALCULATE(MAX(Bob[Score]),ALLEXCEPT(Bob,Bob[Product]))

now you have to rank your scores:

ranking based on max = RANKX(ALL(Bob[Product]),[max of eac prodcut],,DESC,SKIP)

and to pick your top 10 :

Top 10 products = CALCULATE([max of eac prodcut],FILTER(Bob,[ranking based on max]<=10))

 

or just go to filters,add filetrs topn and put the max of each product measure as values 

johnt75
Super User
Super User

Create a measure like

Highest score = MAX( 'Table'[Score])

you can then put that into a table visual with the product and use it as a TOPN filter in the filter pane

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.