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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Date range issue

Hi,

 

I have imported an Excel file and now have a column (image below) with years set out as:

 

1991-92 

1992-93

1993-94

 

and so on to 2029-30. They are just a financial year, I have no need to display quarters, months etc. 

 

When I have used them in a line chart with years on the x-axis the years have been muddled up (image below). Perhaps Power BI can't recognise them as a sequence of years. 

 

They are currently set as text, if I transform the column to date I receive an error for most years and the remainder change to 1/01/2000 format (image below).

 

X-axis showing muddled years:

PBI x-axis.png

Year column:

 PBI year issue.png

 

Transformed year column:

PBI year issue 2.png

 

Any pointers to a solution or suggestions would be appreciated. 

 

Cheers,

Brent

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , The format YYYY-YY is self sortable. from three dots it should sort .

 

Else you can create a fate column like

In power Query

#date(Number.FromText(Text.Start([Year],4)),1,1)

 

or dax

Date(Left([Year],4),1,1)

 

In case you create a column in DAX

also create

Year 1 = [Year]

 

and use Year 1 in visual and this should have a date as the sort column

why refer : How to Create Sort Column and Solve Related Errors: https://youtu.be/KK1zu4MBb-c

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , The format YYYY-YY is self sortable. from three dots it should sort .

 

Else you can create a fate column like

In power Query

#date(Number.FromText(Text.Start([Year],4)),1,1)

 

or dax

Date(Left([Year],4),1,1)

 

In case you create a column in DAX

also create

Year 1 = [Year]

 

and use Year 1 in visual and this should have a date as the sort column

why refer : How to Create Sort Column and Solve Related Errors: https://youtu.be/KK1zu4MBb-c

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Oh, it was as simple as sorting. Thanks for taking the time to respond!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.