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
rahuldas_vgm
Helper I
Helper I

Need help with sorting alphanumeric values

Hello,

I am trying to find a solution to how to sort alphanumeric values in a matrix visual. I have values :R1 R2 R3 R4 R5 R6 R7 R8 R9 R10.

These values are coming from a New column (not calculated column from edit query but from data window) made containing measure which is calculating the R1 R10 values. I need R10 to be showing up after R9 instead of after R1.

 

Since the column wont appear in edit query, is there a way i can make R10 appear after R9?

 

Thanks in advance for your help and suggestion 

1 ACCEPTED SOLUTION
rahuldas_vgm
Helper I
Helper I

I guess i figured out a way to resolve the problem. By adding zero width space unichar() one can manage to tackle these kind of problem. Also adding space between the alphabet and number helps for numeric values in single digit, like R1 R10 R2 R3 will be sorted as R 1 R 2..... R 9 R10.

In case someone comes up with a more convincing solution please help! 

View solution in original post

4 REPLIES 4
Rastus
New Member

Posting this here for anyone else looking fr a solution:
Sort one column by another column in Power BI - Power BI | Microsoft Learn

rahuldas_vgm
Helper I
Helper I

I guess i figured out a way to resolve the problem. By adding zero width space unichar() one can manage to tackle these kind of problem. Also adding space between the alphabet and number helps for numeric values in single digit, like R1 R10 R2 R3 will be sorted as R 1 R 2..... R 9 R10.

In case someone comes up with a more convincing solution please help! 

Greg_Deckler
Community Champion
Community Champion

@rahuldas_vgm Duplicate your column in Power Query. Do a replace to remove the R with nothing (null). Use this as your Sort By column for your R1-R10 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...

Thank you @Greg_Deckler for helping! 
The column will not show in query edit as it is a created column referencing a measure.
I am unable to write the dax code in edit query.

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.