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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Dunner2020
Post Prodigy
Post Prodigy

Sorting the date table and it reflection on line graph

Hi there,

 

I have a date table which contains the Month name and Month Number. I setup Month Number in such a way that April considered as Month 1 and March treated as Month 12. I have sorted the column based on the Month number (as shown in the figure).

myasir_0-1600636279658.png

 

I am plotting a line graph on which the x-axis contains the Month name. I sorted the date column based on Month Number which means that the x-axis of the line graph shows the first month as April but still it shows January as its first name (as shown in the picture).

myasir_1-1600636387084.png

 

Could anyone help me in sorting out the issue?

 

 

 

 

1 ACCEPTED SOLUTION
Sumanth_23
Memorable Member
Memorable Member

hi @Dunner2020 - You need to follow the below steps to sort the month column by Month number. If you follow the below steps the data should be displayed in the month order that you require. 

 

Sumanth_23_0-1600639168723.png

 

Sumanth_23_1-1600639236655.png

Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!

Proud to be a Super User!



View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Dunner2020 , Sort column for

Month for FY April to March //File is attached after Signature

Month = format([Date], "MMM")

Start Of Year= STARTOFYEAR('Date'[Date],"3/31")
Month Sort = DATEDIFF('Date'[Start Of Year], 'Date'[Date],MONTH)+1 // mark this as sort column 

 

for CY

Month = format([Date], "MMM")

Month Sort = format([Date], "MM") // mark this as sort column

 

For Month Year

Month = format([Date], "MMM-YYYY")

Month Sort = format([Date], "YYYYMM") // mark this as sort column 

 

Refer Steps :https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Sortnewribbion.png

 

 

In case you have FY other than

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
Sumanth_23
Memorable Member
Memorable Member

hi @Dunner2020 - You need to follow the below steps to sort the month column by Month number. If you follow the below steps the data should be displayed in the month order that you require. 

 

Sumanth_23_0-1600639168723.png

 

Sumanth_23_1-1600639236655.png

Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!

Proud to be a Super User!



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors