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
mb0307
Responsive Resident
Responsive Resident

Sorting Top 5

Hi all,

 

I am showing % difference in a matrix table. 

 

How can I sort top 5 Products based on another measure, see below?

 

DOWNLOAD - DATA AND PBIX FILE

 

mb0307_0-1677658888994.png

 

 

Thank you in advance.

 

12 REPLIES 12
mb0307
Responsive Resident
Responsive Resident

Can anyone help with this please?

Padycosmos
Solution Sage
Solution Sage

Hope this helps:

Padycosmos_0-1677503997483.png

Padycosmos_1-1677504031996.png

 

mb0307
Responsive Resident
Responsive Resident

@Padycosmos thanks again but this is not the requirement.  Please read my post and files. 

mb0307_0-1677516492484.png

 

Add the measure diff to tooltips and then click on the ellipsis and select descending and diff

This video illustrates that

https://www.youtube.com/watch?v=1bp_e-ik7aA

mb0307
Responsive Resident
Responsive Resident

it doesn't work for Tables and Matrix unfortunately. 

Padycosmos
Solution Sage
Solution Sage

Here's an excerpt from a Microsoft document on TOPN() wherein it is stated that the result is not sorted in any order. So apparently, sorting has to be done manually : https://learn.microsoft.com/en-us/dax/topn-function-dax

 

Padycosmos_0-1677497351042.png

 

mb0307
Responsive Resident
Responsive Resident

@Padycosmos  thanks but I am not using TopN.  

lucadelicio
Super User
Super User

I think you have to built a calculated column with a RANKX and use it to order. But you have to pay attention to the circular dependency. If i have time a try to help you in the next day.



Luca D'Elicio

LinkedIn Profile

@lucadelicio thanks, please see if you can help with this one. As i am not sure how to do this. 

mb0307
Responsive Resident
Responsive Resident

Can anyone help please?

lucadelicio
Super User
Super User

Is this what you need?

lucadelicio_0-1677250599552.png

 



Luca D'Elicio

LinkedIn Profile

@lucadelicio  No my friend.  Please read the instruction in the PBIX

 

The Accuracy % table should show SKU in this order: 

mb0307_0-1677250902441.png

 

Thanks.

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.