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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sonuojha1
Helper IV
Helper IV

How to customize X-Axis of bar graph to show Month only instead of Year-Month

Hello All,

I have a requirement to show bar graph month wise. Even if multiple year selected from year slicer.

I don't want to show month-year on x-axis as "Jan-2020","Jan-2019" etc. Instead of this, I want to show "Jan" for both bars(2020, 2019). I selected both years ( 2020, 2019) from year slicer.

sonuojha1_0-1608039352901.png

 

sonuojha1_0-1608038985798.png

sonuojha1_1-1608039183712.png

 

Regards,

Sonu

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @sonuojha1 ,

 

Are you looking for something like shown below?

Pragati11_0-1608039815670.png

 

For this you can create 2 new columns in your data using your DATE column and then use them on the chart as shown on the above screesnhot.

The 2 new columns will be for Month and Year part of your DATE column. You can use following DAX for them:

Month = FORMAT(ClothingSales[Date], "MMMM")
Year part = YEAR(ClothingSales[Date])

 

Use your table's date column in the above DAX expressions.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

2 REPLIES 2
Pragati11
Super User
Super User

Hi @sonuojha1 ,

 

Are you looking for something like shown below?

Pragati11_0-1608039815670.png

 

For this you can create 2 new columns in your data using your DATE column and then use them on the chart as shown on the above screesnhot.

The 2 new columns will be for Month and Year part of your DATE column. You can use following DAX for them:

Month = FORMAT(ClothingSales[Date], "MMMM")
Year part = YEAR(ClothingSales[Date])

 

Use your table's date column in the above DAX expressions.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thanks Pragati,

It helped partially to fullfill my requirement in addition to this.

 

Regards,

Sonu

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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