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

Sorting Alphanumeric in custom order

Hi All,

 

I want Alphanumeric values to be sorted in below format.

A99
A98
A95
A92
B87
B83
B72
C72
C67
C63
D57
D55
D45

 

Alphabets in ascending and numbers in descending here. 

Note: Numbers can be repeated in text.

 

Thanks in Advance.

 

Thanks,

Aradhana

1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

You will have to add a calculated column to define the sort order and then sort the field.. Take a look at the below video.

 

How to Custom Sort Multiple Columns in Power BI | MiTutorials

View solution in original post

8 REPLIES 8
v-saisrao-msft
Community Support
Community Support

Hi @Aradhana,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

miTutorials
Super User
Super User

You will have to add a calculated column to define the sort order and then sort the field.. Take a look at the below video.

 

How to Custom Sort Multiple Columns in Power BI | MiTutorials

Hi miTutorials,

 

I checked your video, means I need to create the new table with alphanumeruc field and id(say 1,,2,3,4..) field manually and sort the alphanumeric field by id field?

Please correct me If I'm wrong.

 

Thanks,

Aradhana

Hi @Aradhana,
I wanted to check if you had the opportunity to review the information provided by @miTutorials . Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

If you have a lot of rows then it's good to create a table, merge and then sort else simply create a calculated column to return the sort order. See below video on how to create the calculated column.

 

How to Custom Sort in Power BI | MiTutorials | #powerbi #PowerBITutorial - YouTube

Hi miTutorials,

 

Your solution works only If there are fixed values. What if new data arrives in data model? then how fixed sorting order will work?

 

Thanks,

Aradhana

Hi @miTutorials

 

Your solution works only If there are fixed values. What if new data arrives in data model? then how fixed sorting order will work?

 

Thanks,

Aradhana

meechielvp60
Helper I
Helper I

OK

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.