cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Dates not showing in chronological order - Date Table

My dates are not visualizing in chronological order since i created a date table and linked the receipt date to the date table (relationship).

Need help making these visualize in chronological order on all my charts.
i've tried using a sort calculation for my Month & Year column with this:  Year - Month - Sort = YEAR('Date'[Year])*12+Month('Date'[Date])-1

Below is the chart i'm stressing over:  Note the dates are not in chronological order.

Below is the table from chart above:

Below is the Date table showing how i have the Month & Year column sorted by the Month Year Sort column with the above calculation.

How can i get all of my dates to visualize in chronological/date order?

Thanks Community! You have been very helpful so far!

1 ACCEPTED SOLUTION

What is in your year-month column?  It doesn't look right (but it's hard to see). I normally use YYYYMM as this sorts well.

* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
3 REPLIES 3
Frequent Visitor

For others, I followed @MattAllington advice and created another column on my date table to sort by.

Here's that formula:

MonthYr = format('Date'[Date],"YYYYMM")
I then changed my Month & Year to sort by column MonthYr.  Worked like a charm!

Thanks @MattAllington
Frequent Visitor

I love how simple this solution is!  Thanks very much.  I can now rest!

What is in your year-month column?  It doesn't look right (but it's hard to see). I normally use YYYYMM as this sorts well.

* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors