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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.