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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Changing columns order i matrix

I have the following matrix and I want a specific column order:

 

21.PNG

 

the problem is that for product=00000001 there are three versions(version1, version2,version3) but if I select product=00000008 it might be twenty versions(version1.... version20). There are more that one hundred products and I don't know how many versions each of them have.Version1 is always the oldest and the last version is the newest one. How can I sort the columns so it shows from newest version?(in above screenshot I want to sort so it shows version3, version2,version1. The first column, Production is freezed)

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You might have to on this column or create one more column and do on that. As after this column will sort desc.

 

Version New = [Version] /// New colum which will sort desc

Version New Rank = Rankx(All(Table),[Version],,desc,Dense) // Do not use Verison New

 

Now mark the Version New Rank  as sort column of Version New

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

In case of any issue with rank refer

For Rank Refer these links

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , You might have to on this column or create one more column and do on that. As after this column will sort desc.

 

Version New = [Version] /// New colum which will sort desc

Version New Rank = Rankx(All(Table),[Version],,desc,Dense) // Do not use Verison New

 

Now mark the Version New Rank  as sort column of Version New

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

In case of any issue with rank refer

For Rank Refer these links

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale

Anonymous
Not applicable

Thank you @amitchandak . 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.