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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
XhevahirMehalla
Helper IV
Helper IV

Unable to sort by Month using Date table which I created

Hello - 

 

I have a classical case when I am unable to show months in right Order even though I am trying the right thing and setup to accomodate that.

 

I have a date table which I created as:

Date =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2025, 12, 1 ), DATE ( 2026, 12, 31 ) ),
    "Year", YEAR ( [Date] ),
    "Month_No", MONTH ( [Date] ),
    "Month", FORMAT ( [Date], "MMMM" ),
    "Month_Short", FORMAT ( [Date], "MMM" ),
    "Month_Key", YEAR ( [Date] ) * 100 + MONTH ( [Date] ),
    "Quarter", "Q" & QUARTER ( [Date] ),
    "Month_Start_Date", DATE ( YEAR ( [Date] ), MONTH ( [Date] ), 1 ),
    "Month_End_Date", EOMONTH ( [Date], 0 ),
    "Year_Quarter", FORMAT ( [Date], "YYYY" ) & " Q" & QUARTER ( [Date] )
)

 

I tried few things:

  1. Data tried to sort by Month_key - and it shows an error.
  2. XhevahirMehalla_1-1779177522670.png

     

     
  3. I tried to sort by in the visual - still not change.
  4. XhevahirMehalla_2-1779177609996.png

     

My visuals are not sorted correctly.

XhevahirMehalla_0-1779177384712.png

 

What I am missing? what else to do?

 

I need help!

 

Thanks

Xhev

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You need to sort the month column by month number, not month key. December 2025 and December 2026 will have different month keys, but the same month number.

View solution in original post

2 REPLIES 2
XhevahirMehalla
Helper IV
Helper IV

Thanks Jonh! I worked!

johnt75
Super User
Super User

You need to sort the month column by month number, not month key. December 2025 and December 2026 will have different month keys, but the same month number.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.