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
GiulianoPowerBI
Regular Visitor

Date Hierarchy in a line chart. Month name ordering

Hello,

I did setup a line chart with an x axis layered for year, month name and day.

One i drilldown on an year, I'm having issue to sort month name by proper order and not like this (by alphabetical order):

 

 

unnamed.png

 

How can I solve?

Thank you

3 ACCEPTED SOLUTIONS
PijushRoy
Super User
Super User

Hi @GiulianoPowerBI 

Create a Monthly lookup table with sort order
Then Month column should be sort by Sortorder column

PijushRoy_0-1703969623870.png


Create relationship with your Fact table by Month column 
Use the newly created month column in Visual and use Visual sort by month

If solved your requirement, please mark this answer as SOLUTION. Appreciate your KUDOS 


Thanks
Pijush




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

Proud to be a Super User!





View solution in original post

Anonymous
Not applicable

Hi @GiulianoPowerBI ,

 

I can provide you with a schematic schedule Please check:

vtianyichmsft_0-1704072846555.png

DimDate = 
ADDCOLUMNS (
    CALENDARAUTO (),
    "Year", YEAR ( [Date] ),
    "Month", FORMAT ( [Date], "MMMM" ),
    "MonthSort", MONTH ( [Date] ),
    "Day", DAY ( [Date] ),
    "DayName", FORMAT ( [Date], "DDDD" ),
    "WeekDay", WEEKDAY ( [Date],2 ),
    "WeekStart",
        [Date] - WEEKDAY ( [Date], 2 ) + 1
)

You can sort by any column.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @GiulianoPowerBI ,

 

I can provide you with a schematic schedule Please check:

vtianyichmsft_0-1704072846555.png

DimDate = 
ADDCOLUMNS (
    CALENDARAUTO (),
    "Year", YEAR ( [Date] ),
    "Month", FORMAT ( [Date], "MMMM" ),
    "MonthSort", MONTH ( [Date] ),
    "Day", DAY ( [Date] ),
    "DayName", FORMAT ( [Date], "DDDD" ),
    "WeekDay", WEEKDAY ( [Date],2 ),
    "WeekStart",
        [Date] - WEEKDAY ( [Date], 2 ) + 1
)

You can sort by any column.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 

PijushRoy
Super User
Super User

Hi @jjrand 

In DateTable, need to change the SortBy order for Month. 
Otherwise it will sortby Alphabetic order

@GiulianoPowerBI If you using, DataTable, please use DAX Month('DateTable'[Date]) to create another column for MonthNumber.
MonthName should be SortBy MonthNumber column (assuming your year start from Jan to Dec)


If solved your requirement, please mark this answer as SOLUTION. Appreciate your KUDOS 


Thanks
Pijush




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

Proud to be a Super User!





PijushRoy
Super User
Super User

Hi @GiulianoPowerBI 

Create a Monthly lookup table with sort order
Then Month column should be sort by Sortorder column

PijushRoy_0-1703969623870.png


Create relationship with your Fact table by Month column 
Use the newly created month column in Visual and use Visual sort by month

If solved your requirement, please mark this answer as SOLUTION. Appreciate your KUDOS 


Thanks
Pijush




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

Proud to be a Super User!





This would work, however I would suggest creating a proper date table

 

https://www.sqlbi.com/articles/creating-a-simpler-and-chart-friendly-date-table-in-power-bi/

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