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
Winniethewinner
Helper IV
Helper IV

Month sorting for a dynamic axis chart

Hi everyone, 

I created a dynamic axis chart by using this approach: View solution in original post

The values in dimension table is Text: 

Winniethewinner_0-1648751930921.png

Is there a way to add a column with Month name of Jan - Dec, and sort it properly in the chart?

Winniethewinner_1-1648752123977.png

Thank you. 

 

2 REPLIES 2
Anonymous
Not applicable

Hi  @Winniethewinner ,

I created some data:

vyangliumsft_0-1649038192518.png

Here are the steps you can follow:

1. Create calculated table named Date.

Date =
CALENDAR(DATE(2021,1,1),DATE(2021,12,31))

Create calculated column in Date table.

month =
FORMAT('Date'[Date],"m" )
month_flag = FORMAT('Date'[Date],"mmm")

vyangliumsft_1-1649038192519.png

2. Create calculated table named Sort_table

Sort_table =
SUMMARIZE('Date','Date'[month],'Date'[month_flag])
Create calculated column in Sort_table table.
rank = RANKX(ALL('Sort_table'),VALUE('Sort_table'[month]),,ASC)

Check [month_flag] - Column tools - Sort by column - [rank] in the Sort_table table

vyangliumsft_2-1649038192521.png

3. Connect Table with Sort_Table.

vyangliumsft_3-1649038192523.png

4. Result:

vyangliumsft_4-1649038192524.png

Please click here for the pbix file

 

Best Regards,

Liu Yang

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

Thanks for your suggestion @Anonymous . 

I'm trying out your solution and have 2 quesitons: 

1. Your Table has 2x Attributes: Month and DAYOFWEEK. If the DAYOFWEEK has values of 1,2,3,4,5,6,7, how would you make the chart Axis to be switched between month_flag and DAYOFWEEK?   

2. For some reason, after I entered calculated column Rank = RANKX(ALL('Sort_Table'),VALUE('Sort_Table'[Month]),,ASC) in the Sort_Table, it starts with 2 instead of 1:

Winniethewinner_0-1649084265068.png

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