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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
DaleC
Regular Visitor

Sort by Month

Hi Have a simple problem which I hope someone can assist. Y axis is $ X axis is date (excel spreadsheet date format incl year) Generally an X axis should run chronologically eg: Jan 17 Feb 17 Mar 17 ...... Jan 18 Feb 18 and so on However when I sort by Month it throws the 2018 months ahead of the 2017 eg: Jan 18 Feb 18 Aug 17 Sep 17 Oct 17 ..... and so on Is there a solution to sort the months chronologically on the X axis?

Cheers

Dale

Capture.JPG

 

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @DaleC,

For X axis, MMM Year column sort by initial letters, so it shows as what you see. Please format your date format as 201701,201702 using the format.

Year-month =
IF (
    'Calendar'[Month] <= 9,
    'Calendar'[Year] & "-"
        & "0"
        & 'Calendar'[Month],
    'Calendar'[Year] & "-"
        & 'Calendar'[Month]
)


It will show desired result.

1.PNG

Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @DaleC,

For X axis, MMM Year column sort by initial letters, so it shows as what you see. Please format your date format as 201701,201702 using the format.

Year-month =
IF (
    'Calendar'[Month] <= 9,
    'Calendar'[Year] & "-"
        & "0"
        & 'Calendar'[Month],
    'Calendar'[Year] & "-"
        & 'Calendar'[Month]
)


It will show desired result.

1.PNG

Best Regards,
Angelia

Anonymous
Not applicable

Have the X axis column in MMMM YYYY format.

Capture.PNG

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.