Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi, anyone know how to show top / bottom 3 SKUs by considering the accuracy % and MAD volume in Power BI chart.
Creteria for Top/Bottom as follow:
I tried the TopN, but it only allowed me to choose based on 1 creteria. not sure if it can be use for both creteria. Another thing is, I would like to exclude SKUs with 0 value.
| SKUs | MAD | Accuracy |
| Product A | 40 | 95% |
| Product B | 55 | 80% |
| Product C | 60 | 75% |
| Product D | 80 | 60% |
| Product E | 120 | 30% |
| Product F | 200 | 15% |
| Product G | 0 | 0 |
| Product H | 80 | 30% |
| Product X | 20 | 40% |
Solved! Go to Solution.
Hi @Liviachia ,
Regarding your question, are you creating a measure? The creation should be a table.
If you want to filter the visual objects, do the following.
Table 3 = ADDCOLUMNS(VALUES('Table'),"Rank",RANKX('Table 2',[Accuracy],,,Dense) * 100 + RANKX('Table 2',[MAD],,ASC,Dense))
pls see if this is what you want
Proud to be a Super User!
Hi @ryan_mayu ,thanks for the quick reply, I'll add further.
Hi @Liviachia ,
Regarding your question, my understanding is that the value in 'Accracy' is the main determinant of the ranking, and only in the case of the same value in 'Accracy', the value in 'MAD' is used for the secondary ranking.
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a table
Table 2 = FILTER('Table','Table'[MAD] <> 0)
2.Use the following DAX expression to create a column in 'Table2'
Column = RANKX('Table 2',[Accuracy],,,Dense) * 100 + RANKX('Table 2',[MAD],,ASC,Dense)
3.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried this but look like the formula is not working. Anyway to do the filtering in the visual instead of my Query?
Hi @Liviachia ,
Regarding your question, are you creating a measure? The creation should be a table.
If you want to filter the visual objects, do the following.
Table 3 = ADDCOLUMNS(VALUES('Table'),"Rank",RANKX('Table 2',[Accuracy],,,Dense) * 100 + RANKX('Table 2',[MAD],,ASC,Dense))
is this your raw data or table visual?
what's the expected output?
Proud to be a Super User!
Raw data and I want to show it in table visual as top 3 and bottom 3
what's the expected output based on the sample data you provide?
what do you mean highest accuracy % and the lowest MAD?
what if it has a high accuracy% and high MAD ?
Proud to be a Super User!
I expect the following
Top 3
Bottom 3
pls see if this is what you want
Proud to be a Super User!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 45 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 108 | |
| 39 | |
| 33 | |
| 25 |