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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
loomisfreeman19
New Member

Column is not sorting by column

Hi, I have a column like this - "Quarter" and "QuarterSortValue"

 

QuarterQuarterSortValue
Q2/252025.2
Q1/252025.1
Q4/242024.4
Q3/242024.3
Q2/242024.2
Q1/242024.1
Q4/232023.4
Q3/232023.3
Q2/232023.2
2025 6 months 
2024 6 months 
2024 
2023 
Q2/252025.2
Q1/252025.1
Q4/242024.4
Q3/242024.3
Q2/242024.2
Q1/242024.1
Q4/232023.4
Q3/232023.3
Q2/232023.2
2025 6 months 
2024 6 months 
2024 
2023 

 

and a sort Quater by QuarterValueSort and still have this -

loomisfreeman19_0-1754508458140.png

Should be like Q2/23 to Q2/25 in that order.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @loomisfreeman19 

It looks like your QuarterSortValue column isn't defined correctly for sorting, as it contains blank values. A sort-by column must be one-to-one and complete – no duplicates or blanks – because the engine can't determine the correct order otherwise.

If you're seeing this issue, it's also likely that the sort wasn't defined in Data View using the "Sort by Column" feature.

Ritaf1983_0-1754549949063.png

 

To ensure proper sorting, make sure you:

1. Ensure QuarterSortValue contains a unique and complete sort order (no blanks).

Ritaf1983_1-1754550358330.png

*** Also, it's not recommended to mix different time hierarchies in the same column (e.g., quarters, half-years, years). For better model structure and clarity, you should have a proper Calendar table with separate columns for Year, Quarter, Half-Year, and so on – each with its own sorting logic.

2. Once all these are set up correctly, your quarters should sort properly from Q2/23 to Q2/25.

Go to Data View, select the Quarter column, and apply "Sort by Column: QuarterSortValue".

Ritaf1983_2-1754550561504.png

 

3 Confirm that in your visual, the X-axis is using the Quarter column and that it's not auto-sorting by another field or being interpreted as text.

Ritaf1983_3-1754550650189.png

 

Once all three are in place, your quarters should sort correctly from Q2/23 to Q2/25.

The pbix with my example is attached ( it has a date table , you can use it for other files )

More information about date tables here:
https://radacad.com/all-in-one-script-to-create-date-dimension-in-power-bi-using-power-query/

 If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

5 REPLIES 5
v-saisrao-msft
Community Support
Community Support

Hi @loomisfreeman19,

We haven’t heard back from you in a while regarding your issue. let us know if your issue has been resolved or if you still require support.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @loomisfreeman19,

Checking in to see if your issue has been resolved. let us know if you still need any assistance.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @loomisfreeman19,

Have you had a chance to review the solution we shared by @Ritaf1983 @danextian ? If the issue persists, feel free to reply so we can help further.

 

Thank you.

Ritaf1983
Super User
Super User

Hi @loomisfreeman19 

It looks like your QuarterSortValue column isn't defined correctly for sorting, as it contains blank values. A sort-by column must be one-to-one and complete – no duplicates or blanks – because the engine can't determine the correct order otherwise.

If you're seeing this issue, it's also likely that the sort wasn't defined in Data View using the "Sort by Column" feature.

Ritaf1983_0-1754549949063.png

 

To ensure proper sorting, make sure you:

1. Ensure QuarterSortValue contains a unique and complete sort order (no blanks).

Ritaf1983_1-1754550358330.png

*** Also, it's not recommended to mix different time hierarchies in the same column (e.g., quarters, half-years, years). For better model structure and clarity, you should have a proper Calendar table with separate columns for Year, Quarter, Half-Year, and so on – each with its own sorting logic.

2. Once all these are set up correctly, your quarters should sort properly from Q2/23 to Q2/25.

Go to Data View, select the Quarter column, and apply "Sort by Column: QuarterSortValue".

Ritaf1983_2-1754550561504.png

 

3 Confirm that in your visual, the X-axis is using the Quarter column and that it's not auto-sorting by another field or being interpreted as text.

Ritaf1983_3-1754550650189.png

 

Once all three are in place, your quarters should sort correctly from Q2/23 to Q2/25.

The pbix with my example is attached ( it has a date table , you can use it for other files )

More information about date tables here:
https://radacad.com/all-in-one-script-to-create-date-dimension-in-power-bi-using-power-query/

 If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
danextian
Super User
Super User

Have you tried checking if the first column is already custom sorted by the second column from the column contextual tab?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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