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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Sort Column variables in Matrix visual

Hi, 

I am new to Power BI and trying to figure out how to sort column items/variables in Matrix visual. I am using Matrix table visual and my column has Gender - Men, Women & People. The table is automatically listing the variables in alphabetical order, i.e. Men, People & Women (please see screenshot below). I would like to order them as Men, Women & People. 

 

Can someone please let me know how to do that. Thank you. 

 

Sort.png

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous - So, in general, you need to add a "Sort By" column and set the "sort by" for the column that has People, Women, Men to this sort by column. The specifics of this implementation will vary depending on your data. If you have People, Women, Men as row values in the same column, then you could implement a conditional calculated column in Power Query that was basically, if Men, 1, Women, 2, People, 3. Then in Power BI Desktop after import, just set your Sort By column for the original column to be this new calculated column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Is this problem solved?


If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please let me know.

 


Best Regards,

Icey

Greg_Deckler
Community Champion
Community Champion

@Anonymous - So, in general, you need to add a "Sort By" column and set the "sort by" for the column that has People, Women, Men to this sort by column. The specifics of this implementation will vary depending on your data. If you have People, Women, Men as row values in the same column, then you could implement a conditional calculated column in Power Query that was basically, if Men, 1, Women, 2, People, 3. Then in Power BI Desktop after import, just set your Sort By column for the original column to be this new calculated column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi Greg - Thanks a lot for the quick response. Greatly appreciated. 

I was able to resolve the issue as per your instructions. Thank you very much. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.