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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

@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

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.