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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.