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! Learn more

Reply
ElizaLi
New Member

Renaming categories in bar chart Power BI

Hi Everyone!

 

I am new to Power BI and have just started a course in Data Analysis. Would really appreciate if someone could help me.

 

I created a bar chart : Number of accidents vs Month. The months in the table are in numbers e.g. Jan is 1, Feb is 2 etc. So, the categories on the X axis of the bar chart are also numbers but I would like them to be Month names. I tried to find an option in the formatting but there doesn't seem to be one.

 

I then thought I may need to create a new column with some kind of rule...I tried SWITCH but I'm not sure how to do it for all 12 months...

MonthName= switch(tablename[MONTH], 1,jan,...) ??
 
Any help would be much appreciated! and apologies if it's a silly question 😞
 
Thanks, Eli
1 REPLY 1
amitchandak
Super User
Super User

@ElizaLi , if you want that sort column prefer to create that in the power query

 

if we have date we create a column and sort column

 

Month = FORMAT([Date],"mmm")


Month sort = month([DAte])

 

and mark Month sort  as sort column of Month

 

or create like

 

Month 1 = [Month]

Month Sort = Switch ( [Month],

"Jan",1,

// add others

)

 

And mark month sort as sort column for month 1  and use

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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