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
budderous
Regular Visitor

Date to run from AUgust to Janary 2022

HI

 

How do i get the dates to show as AUgust to January?

 

budderous_0-1643905661246.png

 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @budderous ,

 

Agree with @BA_Pete .

 

You could drag the following measure to Tooltips pane, and then sort axis by it ascending:

YearMonth = YEAR(MAX('Table'[Date])) *100 + MONTH(MAX('Table'[Date]))

Eyelyn9_2-1644304570220.png

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-eqin-msft
Community Support
Community Support

Hi @budderous ,

 

Agree with @BA_Pete .

 

You could drag the following measure to Tooltips pane, and then sort axis by it ascending:

YearMonth = YEAR(MAX('Table'[Date])) *100 + MONTH(MAX('Table'[Date]))

Eyelyn9_2-1644304570220.png

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

BA_Pete
Super User
Super User

Hi @budderous ,

 

First, you should set up a calendar table if you don't already have one and add this as a column into it. You can also do this directly in your fact table if you want, but it's not best practice:

 

Add a new column like this:

 

// Power Query
Date.Month([yourDateField])

// OR

// DAX
MONTH(yourTable[yourDateField])

 

 

Then, in the Data view for your table, select your month NAME field, go to Column tools tab > Sort by column > select your new month number column from the dropdown list.

 

This may cause you some issues if displaying multiple years' data on a chart, but it should be enough to get you started on the process so you can expand it to month/year when you need to.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Any more suggestions?

Hi @budderous ,

 

To make the sorting work over year boundaries, you need a yearMonthKey field to sort against.

Add this as a new custom column then sort your month/year field (mmm-yy) with it as before:

Date.Year([yourDateField]) * 100 + Date.Month([yourDateField])

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




I think i have done this already, albeit keeping it all on the same table.  The issue i am having is making January 22 show at the end of the graph rather than the beginning

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors