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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Harshal
New Member

How to create a custom sort order for a visualization?

Hello,

 

I have a requirement where i need to create plot whose axis is sorted in a way i want. E.g. my axis has stages Presentation Booked, Presentation Delivered, Hot, Warm, Contract Sent etc. I am plotting the revenue present in pipeline against each of these stages, by default the sort order can be stages(text) or amount(number). But is it possible to create a custom sort like.. 1.Presentation Booked, 2.Presentation Delivered, 3. Warm, 4. Hot, 5 Contract Sent?

 

Currently i could only figure out two options:

1. Literally rename my stages along with numbers like above ..1.PB,2.PD etc. which confuses the executives!

2. Create a new table with first column as index and second column and stages, later join this table with the original table by stages and then sort the stages column using index column of the joined table.

 

I was wondering if there is any other way to do the same?!

 

Also, i have similar requirement with date type, my axis has first day of the week given as 10/3,10/10,10/17,10/24 which is by default considered as text and messes the sort order. I fixed this by concatinating the week number with it. Which looks like 1,10/3,  2,10/10 etc. But this again confuses the person reading the report!!

 

If there are any suggestions to solve this problem then i shall appreciate that!

 

Thanks a lot for all the support!

 

Regards,
Harshal

3 REPLIES 3
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Harshal

 

You may try to use Sort by column for your column. Show a sample as below:

 

First, add custom column in Query Editor to set the sort column for your data.

1.png

 

Second, use sort by column for 'stages' column as below.

1.png

 

Last, you just need to set the sort as requested for your visual.

1.png

 

Regards,
Cherie

 

 

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-cherch-msft/Cherie,

 

Thanks a lot for your time. 

 

I had already implemented this solution as mentioned in my question. 🙂 But i was wondering if there was any other way to do so because i am having four graphs on one dashboard which i need to custom sort so i thought making four tables is a bit excessive!

 

Also for one report i have my x-axis as first day of the week given as mm/dd, as it's a custom created field its stored as text thus causing troubles in getting a proper sort order. I have fixed it by appending the week number to it but the executives don't like it! If you happen to know any way to fix this also then that would be awesome!

 

Thanks a lot!

 

Regards,

Harshal

Hi @Harshal

 

It seems you may try to add a table for custom order and then link the tables in relationship view. Here is the reference for you,

 

https://community.powerbi.com/t5/Desktop/Custom-Sorting-in-PowerBI/td-p/126534

 

Regards,

Cherie

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.