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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Scout
Regular Visitor

Date Dim Table Not Sorting Correctly

Hello, 

 

I cannot figure out why my graphs are not sorting correctly. I've created a DateDim table, marked the table as a date table, and sorted it by date, but I can't get my graphs to sort correctly. Please find the screenshots below. Thank you!

 

I've marked the table as a Date Table, and sorted it ascending by the date.I've marked the table as a Date Table, and sorted it ascending by the date.Date1.png

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Scout 

 

Download example PBIX file

 

You're chart is ordered by a text value on the x-axis.  To sort correctly (by date) you need to create a new numeric column in your Date Table then set the MonthID column to sort by that.

 

To create the column you can use this

 

YearMM = FORMAT([Date], "YYYYMM")

 

 

Then select the MonthID column and click on Sort by Column in the Ribbon and choose the new YearMM column.

 

sortbyx[1].png

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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