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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ErikBI
Resolver I
Resolver I

How to abbreviate the months on the X-axis of a bar chart?

Hey guys,

 

Short question. is there a way where I can tell powerbi so shorten these labels to the first 3 lettes? Because they don't really fit properly and I there is no space to make the chart wider. I also tried changing the date format but that doesn't work.

 

Thanks!

 

image.png

1 ACCEPTED SOLUTION

@ErikBI 

As @Greg_Deckler mentions, you can hold click and drag fields on top of each other to create an hierarchy (you must have done it by mistake once, I have 😁 ). This can also be done for non date fields like product class/ group combinations. For a custom date hierarchy, it would look like this (red box):

 

Untitled.png

View solution in original post

8 REPLIES 8
carmarols
New Member

I solved it like this - make a column from the date column as a month name column, change that column to keep first three letters. make your own hierarchy with year and month short name, make month short name sort by column month number. Works for me. 

carmarols_0-1604680014160.png

 

ErikBI
Resolver I
Resolver I

@v-shex-msft @DouweMeer @Greg_Deckler 

 

I tried your solutions, and they work to a certain degree.

But sadly It doesn't work when I format the axis to use date hierachy. I really like this because it looks cool when the year numbers are listed below the months, and not mentioned after each month.

 

I guess the only option that remains is to just make the graph wider.

But still, thanks for your suggestions!

 

 

 

 

@ErikBI 

As @Greg_Deckler mentions, you can hold click and drag fields on top of each other to create an hierarchy (you must have done it by mistake once, I have 😁 ). This can also be done for non date fields like product class/ group combinations. For a custom date hierarchy, it would look like this (red box):

 

Untitled.png

Aah yeah. I've accidentillly created those more than I'd like to admit 😄

 

Thanks to you and @Greg_Deckler 

If you want a date hierarchy of your own formatted styles, just create multiple columns in your table that have the formatting that you want. Then you can drag and drop these columns into a hiearchy for your axis.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
v-shex-msft
Community Support
Community Support

HI @ErikBI,

I'd like to suggest you extract month field to a new column with format function or try to configure fields formatting in table properties:

17.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

I believe it is FORMAT([Date],"mmm")


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

@ErikBI 

 

From my notes:

 

General numberNo format
CurrencyAs a price value
Fixed2 decimal no thousand seperator
Standard2 decimal with thousand seperator
Percentpercentage of the number
ScientificScientific notification with 2 decimals
Yes/No0 = No, Rest = Yes
True/False0 = False, Rest = True
On/Off0 = off, Rest is on
  
General dateShort date + long time
Long Datewednesday, march 12 20018
Medium Datewednesday, march 12 20018
Short Datemm/dd/yyyy
Long time12 hours + seconds
Medium time12 hours
Short time24 hours
  
mmmonth number
mmmMonth short
mmmmMonth long
yyyy/mmyear / month number
yyyy/mmmyear + month short
QQuarter
dddDay of week short
ddddDay of week 
  
####Value to text

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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