Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello!
I have a table with products and their rating score, like this:
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.
Solved! Go to Solution.
Hi @Anonymous ,
Please create a new column:
RANK = RANKX('Table',[Sore],,DESC,Skip)
Create a table and put RANK field into filters, you can show the top 10 products according to their highest score.
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.
Hi @Anonymous ,
Please create a new column:
RANK = RANKX('Table',[Sore],,DESC,Skip)
Create a table and put RANK field into filters, you can show the top 10 products according to their highest score.
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.
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
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
User | Count |
---|---|
52 | |
51 | |
20 | |
17 | |
16 |
User | Count |
---|---|
113 | |
45 | |
44 | |
28 | |
22 |