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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
tushargunjal
New Member

How to arrange Months

Hi,

 

How to arrange month Jan-Feb. I have import excel sheet with month colom from Jan to Oct. Its not showing as per calender Months.

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

@tushargunjal

 

Firstly, you need to add a calculated column with SWITCH() to conver the Month Name into Month Number: 

 

Month_Number =
SWITCH (
    [MONTH],
    "August", 08,
    "December", 12,
    "July", 07,
    "November", 11,
    "October", 10,
    "September", 09,
    "April", 04,
    "February", 02,
    "January", 01,
    "March", 03,
    "May", 05,
    "June", 06
)

Then combine year part and 1st to make it into a calendar date. 

 

=Date(2017,[Month Number],1)

Regards,

View solution in original post

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@tushargunjal

 

Firstly, you need to add a calculated column with SWITCH() to conver the Month Name into Month Number: 

 

Month_Number =
SWITCH (
    [MONTH],
    "August", 08,
    "December", 12,
    "July", 07,
    "November", 11,
    "October", 10,
    "September", 09,
    "April", 04,
    "February", 02,
    "January", 01,
    "March", 03,
    "May", 05,
    "June", 06
)

Then combine year part and 1st to make it into a calendar date. 

 

=Date(2017,[Month Number],1)

Regards,

mikeborg82
Advocate II
Advocate II

do you have a date dimension table in your model?  If not, google the M script for date dimension table powerbi.  Add that as a table and you can join your fact data to this table.  sort months by month number and you should be good.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors