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
Anonymous
Not applicable

Pivot chart doesnt sort custom date correctly

Hi experts,
I need the following format on my date "dd/mm/yyyy ddd" (31/12/2021 Sun) so I am using the format function on powerpivot to get the date in that format, however when I do that, my chart doesn't sort the date correctly. See pic below
 
Correct sorting using standard date format
 
 
guinaba_2-1629070451713.png

Incorrect sorting using formatted date

guinaba_3-1629070554067.png

Any suggestion? 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks @Anonymous , I ended up solving the problem sorting out the column based on another col. which was date type

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@Anonymous That's because using FORMAT changes the data to Text and not Date. You will need a Sort By column most likely or try using custom format strings. See Chelsie Eiden's Duration. Chelsie Eiden's Duration - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

 

Thanks @Greg_Deckler , however not sure how I could adjust your suggestion (link) from hours to days. I have tried to change the date format, still using the date format, but not sure why Excel doesn't recognize it. Using Sort by column doesn't work either. I am not using powerbi, just excel.

 

guinaba_0-1629107176646.png

 

Anonymous
Not applicable

Hi @Anonymous ,

The line chart can sort by the date field correctly even though set the format of the date field as "dd/mm/yyyy ddd" just as shown in below screenshot...

yingyinr_0-1629272299683.png

In addition, please review the content in the following links, hope they can help you resolve the problem.

Excel Won't Sort Dates Correctly - The Solution!

How to sort by date in Excel: in chronological order, by month, auto sort

Best Regards

Anonymous
Not applicable

Thanks @Anonymous , I ended up solving the problem sorting out the column based on another col. which was date type

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.