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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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