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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.