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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rachelbi
Helper I
Helper I

Sorting the month name in ascending order instead of month number

Hi there, 

 

I created a graph showing the data in current month and upcoming 3 month, i.e. Apr to Jul, including months even has no data (e.g. Jun). I would like to change the month number into month name by using the date table. However, the month name cannot show the missing month data (e.g. Jun) and in wrong order (prefer ascending).

 

Appreciate for any help!

 

rachelbi_0-1713941175161.png

 

After change to "Month name", June data missed, not in acsending order, and I worry in the graph still be correct from 2024 Dec to 2025 Mar (whether be able to show the correct order in the x-axis).

 

rachelbi_1-1713941285674.png

 

My date table seems correct btw:

rachelbi_2-1713941406971.png

 

rachelbi_3-1713941449352.png

 

 

 

 

1 ACCEPTED SOLUTION
manvishah17
Responsive Resident
Responsive Resident

Whenever you want to sort your month name in proper order ( jan, feb...) then always sort it by month number. 
DAX TO CREATE BOTH COLUMN ARE  :

Month = FORMAT((DateTable[Date]), "mmmm")
MonthNo = MONTH(DateTable[Date])
Screenshot 2024-04-30 133510.png

 

 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
manvishah17
Responsive Resident
Responsive Resident

Whenever you want to sort your month name in proper order ( jan, feb...) then always sort it by month number. 
DAX TO CREATE BOTH COLUMN ARE  :

Month = FORMAT((DateTable[Date]), "mmmm")
MonthNo = MONTH(DateTable[Date])
Screenshot 2024-04-30 133510.png

 

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

 

 

AMeyersen
Resolver II
Resolver II

First, you need to sort your column [Month Name] on column [Month] to make sure it's sorted (Jan, Feb, Mar, ... ) instead of (Apr, Aug Dec, ... )
sort_by.png

 

 

 

 

 

 

 

 

Then you need to sort your chart by [Month Name]

sort_chart.png

 

 

 

 

 

 

 

 

to show empty months in the graph, select "Show items with no data" on column [Month name]

show no data.png

Thanks. I did sort by monthyear, but still cannot sort the month name in the graph..

rachelbi_0-1714354737584.png

 

rachelbi_1-1714354765698.png

 

Hi @rachelbi ,

the way it looks, "sort by column" has not yet fully worked.
You need a [month number] column in your date table which only includes the month number (1 for January, 2 for February ...).
Then you need to sort the [month name] column by [month number]


This video explains the issue and its solution step by step:
https://www.youtube.com/watch?v=NlX7Cp2P0d4

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.