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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

sort column in descending character + increasing number

I want to Sort my Job level in Descending order + increasing number such as S1,S2,S3,P1,P2,P3,P4,P5........

sort.JPG

1 ACCEPTED SOLUTION
Migasuke
Memorable Member
Memorable Member

Hi @Anonymous ,

Question here is, if the number of job categories can change or  there might be some additional one, like X, Y etc..

In case you know, that the number of categories is final, I would recommend you to make a custom mapping table, where you define the order - just like S1 = 1, S2 = 2...and then set up, that job categories will be sort out by this new table, where you have ordering.

In case you need to have more dynamic approach I would see as the easiest solution (depends on the model) to use ordering in power query and adding the index column, which can later help as sort out column.

Step 1. Create column for letter (S,E,P...)
2. Create column with related numbers (1,2,3)
3. Set up ordering on letters descdending
4. Set up ordering on numbers asceding
5. Add index column
6. Close and load and use your index column for sorting by.

Result should look like this:

Migasuke_0-1650789913358.png

Migasuke_1-1650789932607.png

 



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Custom Mapping table trick worked and here how it looks like now.

 

 

snap 1.JPG

 

 

Though, I have one more query and that is....

 

I want all these 4 charts into single chart . Is there any solution for it ?

Hi,

Having them all in one chart has several solutions.
1. Put all measures in the single visuals (so you would see 8 columns per category)
2. Use filter or bookmark, where you switch from one measure to another one. Basically you will  not see all values at once, but would be definitely more eye appealing.
3. Use small multiples, but that will look pretty much like what you have now.

One note, usually try raise a new question as a new topic, it is easier for other people to find what you were asking.

Have a nice day,

Milan.



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

tamerj1
Community Champion
Community Champion

@Anonymous 

I assume it is allways one letter one digit number combination. Then you can creat a new calculated column 

Index =

RANX(Table, LEFT(Table[Code],1))*10 + RIGHT(Table[Code],1)

Migasuke
Memorable Member
Memorable Member

Hi @Anonymous ,

Question here is, if the number of job categories can change or  there might be some additional one, like X, Y etc..

In case you know, that the number of categories is final, I would recommend you to make a custom mapping table, where you define the order - just like S1 = 1, S2 = 2...and then set up, that job categories will be sort out by this new table, where you have ordering.

In case you need to have more dynamic approach I would see as the easiest solution (depends on the model) to use ordering in power query and adding the index column, which can later help as sort out column.

Step 1. Create column for letter (S,E,P...)
2. Create column with related numbers (1,2,3)
3. Set up ordering on letters descdending
4. Set up ordering on numbers asceding
5. Add index column
6. Close and load and use your index column for sorting by.

Result should look like this:

Migasuke_0-1650789913358.png

Migasuke_1-1650789932607.png

 



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.