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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PetriR
Regular Visitor

PowerBi gantt sorting bug

Hey,

 

I'm using the 3.0.12.0 version of MS provided Gantt visualization and I noticed that when you sort the data alpabetically, it does not work correctly. If the data lines have uppercase and lowercase first letter, they are treated separately. For example "Turntables" are now before "eBikes". Basically it sends all the lowercase words to end of capitalized list and starts sorting them as their own set after them.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

Thanks for solution rajendraongole1 offered, and i want to offer some more information for user to refer to.

hello @PetriR , based on your descriotion, please check that if you sort it descending, if it is sorting descending, it will sort befoe the "ebikes".

vxinruzhumsft_0-1729735318588.png

And you can try to remove the visual, then recreate it and sort the field.

After tesing, it can work in  my sample.

vxinruzhumsft_1-1729735627220.png

 

If the soution above cannot solve it, you can consider to add a custom column in power query.

 

 

=Text.Upper([Column1])

 

 

vxinruzhumsft_3-1729736180252.png

 

Then in power bi desktop, select the column1 and the select sort by the custom column.

vxinruzhumsft_2-1729736147037.png

Then remove the field in visual  and reput it to the visual, it should work.

 

Best Regards!

Yolo Zhu

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

 

 

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi,

Thanks for solution rajendraongole1 offered, and i want to offer some more information for user to refer to.

hello @PetriR , based on your descriotion, please check that if you sort it descending, if it is sorting descending, it will sort befoe the "ebikes".

vxinruzhumsft_0-1729735318588.png

And you can try to remove the visual, then recreate it and sort the field.

After tesing, it can work in  my sample.

vxinruzhumsft_1-1729735627220.png

 

If the soution above cannot solve it, you can consider to add a custom column in power query.

 

 

=Text.Upper([Column1])

 

 

vxinruzhumsft_3-1729736180252.png

 

Then in power bi desktop, select the column1 and the select sort by the custom column.

vxinruzhumsft_2-1729736147037.png

Then remove the field in visual  and reput it to the visual, it should work.

 

Best Regards!

Yolo Zhu

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

 

 

Thanks for the reply but the data is sorted correctly in the table view but not in the gantt chart. The structure in the gantt is so that there is one data field which categorizes these fields which are not sorting correctly therefore they are not in the "top" level but in the second. So if I remove the top level categorization the sorting works.

Anonymous
Not applicable

Hi @PetriR 

Thanks for your quick reply, can you provide the picture to show the problem you faced, and hide the private information.

 

Best Regards!

Yolo Zhu

I hope you can see here based on the first letters and see the structure. If that narrowing with on field which creates the "+" hierarchy is removed, the sorting works. Therefore it seems like a bug.

Näyttökuva 2024-10-24 090802.png

Anonymous
Not applicable

Hi @PetriR 

You can use the solution i offered, in power query create a custom column to upper the text, then in desktop select the column and sort by the cutom column, you can refet to the 4th meassage.

 

Best Regards!

Yolo Zhu

Thank you for the work around. It might work and I will test it when I have time. However we can only hope that actual bug is fixed.

rajendraongole1
Super User
Super User

HI @PetriR - You can create a calculated column in Power BI that converts all the text to lowercase or uppercase, and then sort your visual based on this column instead of the original text.

 

Eg: SortColumn = LOWER([YourColumnName]) for Lower for upper you can use it for uniformly set the same.

 

After creating this column, you can go to the "Sort by Column" option and choose the new column for sorting.

 

or in Power Query Editor, select the column, then choose Transform > Format > Lowercase or Uppercase.

 

I hope it works.

 





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

Proud to be a Super User!





Hey, thanks for the fast answer but we don't want to change the data since they are product and service names so they need to retain their capitalization.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.