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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Last 12 Months (LTM) Dates Out of Order

Hi,

 

I am using a line and clustered column chart and I want to display the last 12 months of the values I am analysing. I have set the date filter to show the relative date in the last 1 years within the filter column, whereby the dates assessed are saying the correct dates (07/05/21 - 06/05/22) and the chart below is showing the correct values for those months, but they are out of order. This graph is showing Jan-Apr 2022 with the following columns being May-Dec 2021. 

DTaylor888_0-1651828656159.png

If DAX is needed, my date variable is 'Proposal Sent Date', with the column y-axis as 'Gross Value' and line y-axis is 'count of Gross Value', thanks!

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 
If you don't want to use a date table then you need create a Month Number and Month Name columns
Month Number = MONTH ( Table[Date] )
Month Name = FORMAT ( DATE ( 1, MONTH ( Table[Date] ), 1 ), "MMMM" )
You can use the "Sort By" the sort the month name based on month number.
You can also create a date hierarchy as shown in the following screenshot
1.png2.png4.png5.png

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Anonymous 
If you don't want to use a date table then you need create a Month Number and Month Name columns
Month Number = MONTH ( Table[Date] )
Month Name = FORMAT ( DATE ( 1, MONTH ( Table[Date] ), 1 ), "MMMM" )
You can use the "Sort By" the sort the month name based on month number.
You can also create a date hierarchy as shown in the following screenshot
1.png2.png4.png5.png

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors