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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
yellowold5
Helper I
Helper I

Sort columns base on two columns

Hi everyone, I wanna create a custom sort columns for my matrix visuals base on two columns,
values and order:

Valueorder
13
22
31
43
52
62
73
80
90
101
112
123
133
142
153
161
172
183
192
201

want to have one sort columns as value asc and orde desc like this:

valueorder
13
12
22
51
71
201
201
201

 

Is this possible to do in a matrix?

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @yellowold5 -  Sorting a matrix visual based on multiple columns directly within the matrix itself is not supported. However, you can achieve a similar effect by creating a custom column in your data model that combines the two sorting criteria as a workaround.

eg: create a new column with concatenates the Value and Order columns with a "-" separator 

add this column in your matrix visual and use sort from more options

Once you have sorted the matrix visual using the new column, you may want to hide or remove this column from the field list to avoid confusion for report. (hide the column from report view).

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
Uzi2019
Super User
Super User

Hi @yellowold5 
You can do this in power query editor.

first column by Asc
order column by desc

Uzi2019_0-1716979079983.png

 

Add index column

Uzi2019_1-1716979170616.png

 

 

save and apply

 

select your value > sort by column

Uzi2019_2-1716979266236.png

 

 

This will sort you data according to your ASc+desc combination

 

 

Note : your complete table will sort according to these 2 values not only your Matrix.

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
rajendraongole1
Super User
Super User

Hi @yellowold5 -  Sorting a matrix visual based on multiple columns directly within the matrix itself is not supported. However, you can achieve a similar effect by creating a custom column in your data model that combines the two sorting criteria as a workaround.

eg: create a new column with concatenates the Value and Order columns with a "-" separator 

add this column in your matrix visual and use sort from more options

Once you have sorted the matrix visual using the new column, you may want to hide or remove this column from the field list to avoid confusion for report. (hide the column from report view).

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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