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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mrafih
Frequent Visitor

Changing format from December to Dec on chart

Hello everyone,

 

I would like to change the formatting of the following graph

Mrafih_0-1692824116706.png

 

Instead of reading the full dates in the x axis I would like an abreviated version such as Jan, Feb ect.

 

Thanks!

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Assuming the Months on the X-axis have been dragged from the Calendar Table, create this calculated column formula in the Calendar Table

Month name short = format(calendar[date],"mmm")

Ensure that this column is sorted by the Month number column.  To your visual, drag this new column.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Mrafih the solution @Ashish_Mathur is one way to go but you can really avoid sort by column in this scenario. First thing, why you want to avoid that, here it is: when you are writing some advance DAX that needs to work with the month column, you can get unexpected results if you miss including sort by column in your measure, and this is a very common mistake and I have seen pull their hairs why a simple measure is not working.

 

Maybe this is not relevant to your current visualization requirement but you always want to think through and avoid potential issues if a simple and scalable solution is available, in this case, adding an "End of Month" date column, changing the format to "mmm", you would have avoided sort by column. 

 

Just my 2 cents.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Ashish_Mathur
Super User
Super User

Hi,

Assuming the Months on the X-axis have been dragged from the Calendar Table, create this calculated column formula in the Calendar Table

Month name short = format(calendar[date],"mmm")

Ensure that this column is sorted by the Month number column.  To your visual, drag this new column.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
parry2k
Super User
Super User

@Mrafih add another calculated column in your dimension with the following expression, and set the format to "mmm" by selecting this new column, and use it on the visuals.

 

Month Short = EOMONTH ( 'Calendar'[Date], 0 )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.