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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
AyubZafar
Frequent Visitor

Stacked column chart dates are not sorted

I have a Stacked column chart where dates are not showing in order even tried sorting dates in the chart itself i.e. Sort Axis -> SubmissionDate, dates need to start from December 15th first and then towards January, 2024, however these are mixed up at the moment.

 

AyubZafar_0-1705242499533.png

 

Visualization settings:

 

AyubZafar_1-1705242656783.png

 

 

Dates table has been created and set as "Date Table", any clues as to what would be the case?

1 ACCEPTED SOLUTION
qqqqqwwwweeerrr
Super User
Super User

Hi @AyubZafar 

 

As per the schreenshot, i can see the your date Subbmision Date datatype is not correct. Currently it is taking as categorical vairable instead of date. That should fix your issue if not please share more details.

Did I answer your question? if not please provide more details.Mark my post as a solution! Appreciate your Kudos!!

Check for more intersing solution here: https://www.youtube.com/@letssolveproblem

Regards

 

View solution in original post

3 REPLIES 3
AyubZafar
Frequent Visitor

Ah!, I pulled date part from datetime column and didn't realized it resulted into a string and not date, using below PQ code:

 

= Table.AddColumn(#"Removed Columns", "SubmissionDateOnly", each Date.From([SubmissionDate]))

 

Anyway we can parse it to date here in same line of code instead of manually selecting type?

Hi @AyubZafar 

 

I am not 100% sure that i can be work but you can try this by adding one more step like this but manually is only one time activity that you can do in power query so every time you refresh data automaticaly it will change is data type. but you try this query hope that should work 
= Table.TransformColumnTypes(#"Removed Columns",{{"SubmissionDateOnly", type date}}) and reanme the Removed Columns to #'SubmissionDateOnly it should work 

 

Regards

 

qqqqqwwwweeerrr
Super User
Super User

Hi @AyubZafar 

 

As per the schreenshot, i can see the your date Subbmision Date datatype is not correct. Currently it is taking as categorical vairable instead of date. That should fix your issue if not please share more details.

Did I answer your question? if not please provide more details.Mark my post as a solution! Appreciate your Kudos!!

Check for more intersing solution here: https://www.youtube.com/@letssolveproblem

Regards

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.