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
Jessica_17
Helper V
Helper V

Sorting matrix visual

Hello All,
I need quick help in this,
I have a tranformed table in this format,

APP544
ASV35
ACS65
ALM56
ANE787
ANS87
AEBI98
ARev78
AEB54
AFC65
AGC89
AFCC888
ANT21
AGW4
AGWC23
APW88
AHJ98
BPP23
BSV45
BCS45
BLM78
BNE35
BNS42
BEBI54
BRev46
BEB56
BFC5
BGC545
BFCC21
BNT4
BGW23
BGWC88
BPW98
BKK23
CPP45
CSV45
CCS56


And I want a matrix with output like this and in this order only, no matter how raw data's order gets changed

APP544
 SV35
 CS65
 LM56
 NE787
 NS87
 EBI98
 Rev78
 EB54
 FC65
 GC89
 FCC888
 NT21
 GW4
 GWC23
 PW88
 HJ98
BCS45
 EB56
 EBI54
 FC5
 FCC21
 GC545
 GW23
 GWC88
 KK23
 LM78
 NE35
 NS42
 NT4
 PP23
 PW98
 Rev46
 SV45
CCS56
 PP45
 SV45
1 ACCEPTED SOLUTION

Hi @Jessica_17,
Thank you for posting your query in the Microsoft Fabric Community Forum
.

You can keep your custom sorting without showing the SortOrder column. Just add SortOrder to the matrix rows once, sort the matrix by it, and then remove SortOrder from the rows. The sorting will stay applied, but the SortOrder values will no longer appear anywhere including rows, tooltips, so the client won’t see them.


Best regards,
Ganesh Singamshetty.

View solution in original post

11 REPLIES 11
v-ssriganesh
Community Support
Community Support

Hello @Jessica_17,

Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.

Thank you.

 

v-ssriganesh
Community Support
Community Support

Hello @Jessica_17,

We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

Thank you.

ThomasWeppler
Super User
Super User

Hi Jessica

 

Have you choosen Matrix and added the columns like this?

ThomasWeppler_0-1763543146109.png

 

HI @ThomasWeppler 

Yes, I have added values and columns like these

Hii @Jessica_17 

 

Power BI cannot sort the same Code in different ways for A/B/C.
Create a Sort table with a custom SortOrder per Cluster, relate it using Cluster+Code, add SortOrder to the visual, and sort by that column. This gives a stable, fixed sequence exactly as required.

 

image.png

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

HI @rohit1991 ,

Is there any other workaround for this?
As while hovering over values, we are able to see sorting ranks which clients do not want

Hi @Jessica_17,
Thank you for posting your query in the Microsoft Fabric Community Forum
.

You can keep your custom sorting without showing the SortOrder column. Just add SortOrder to the matrix rows once, sort the matrix by it, and then remove SortOrder from the rows. The sorting will stay applied, but the SortOrder values will no longer appear anywhere including rows, tooltips, so the client won’t see them.


Best regards,
Ganesh Singamshetty.

amitchandak
Super User
Super User

@Jessica_17 , Make sure you create sort columns (preferably in Power Query)  on the first two columns or and then sort the matrix of rows. 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
https://youtu.be/cyWVzAQF9YU?t=39560

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

HI @amitchandak ,

This is not working on my case, even if I sort the merged column on basis of ranking column, the other columns are not showing sorted at all, it still shows alphabetically sorted

@Jessica_17 , Consider Sub Category Index or Sub Category Rank  in power query and then use that new column sort column for second column 

Learn in Power Query - Subcategory Index and Rank: https://youtu.be/cyWVzAQF9YU?t=68148

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

HI @amitchandak 
As I mentioned, the data can change in raw format itself, so indexing and ranking might not work all the time.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.