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
Kolumam
Post Prodigy
Post Prodigy

Dates in chronological order

Hi All,

sas.PNG

See the below pic. How do I sort this issue and make it from Jan 2015 to Dec 2015, followed by....Jan 2016..

Kindly help.

 

Thanks

Krishna

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You'll need to change the measure such that you are recording a date.  I'd recommend using:

 

YearMonth = DATE([Year], [Month], 1)

Under Modelling, set the DataType as "Date" and Format to be "March 2001(MMMM yyyy)"

 

EDIT:  The measure above assumes your Month and Year are columns.  If not, take your Date field and use YEAR([DateField]) and MONTH([DateField])

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

It looks like your data is of type "Text" instead of "Date", is that correct?

Hi Ross,

 

 

I changed it to date but when I try to change it, it shows me this error ?


aa.PNG

 

 

 

 

 

 

How do I rectify this ?

 

Thanks

Krishna

Anonymous
Not applicable

You'll need to change the measure such that you are recording a date.  I'd recommend using:

 

YearMonth = DATE([Year], [Month], 1)

Under Modelling, set the DataType as "Date" and Format to be "March 2001(MMMM yyyy)"

 

EDIT:  The measure above assumes your Month and Year are columns.  If not, take your Date field and use YEAR([DateField]) and MONTH([DateField])

Thanks a ton ! @Anonymous

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.