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
HamidBee
Impactful Individual
Impactful Individual

How can I reduce the length of the characters on the X-axis?

Hi,

 

I'd like to change the character lengths for the Months like what is below:

 

Data Bars.png

The x-axis is dates from the date table. I'm trying to change the length of the months into what is below:

 

'Jan', 'Feb', 'Mar' etc.

 

I'm wondering is it possible to do this without creating a new column or table.

 

Thank you,

1 ACCEPTED SOLUTION
KNP
Super User
Super User

Honestly, it is probably just easiest to add a short month name column to your date table.

You don't want to change the default format of your date column as it will effect everything.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

8 REPLIES 8
KNP
Super User
Super User

If you really want to change your date column without adding a column, see below.

KNP_0-1643237093230.gif

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
HamidBee
Impactful Individual
Impactful Individual

Firstly I have to say I really like the use of the GIF, looks neat. Honestly, it did cross my mind to don this however I have several other charts and tables where I require the full character length of the month names. As a last resort, is it possible to create....a measure using the code that TheoC kindly provided?

TheoC
Super User
Super User

Hi @HamidBee 

 

Easiest way is to create a Calculated Column like this:

 

Column = LEFT ( Table[MonthName] , 3 )

 

If you don't want to do a new column, then click on the Month Name field and the three little dots to the right of it.  Right Click and go to New Group. Then you can name each month whatever you like 🙂

 

TheoC_0-1643236628752.png

 

 

Hope this helps 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

KNP
Super User
Super User

Honestly, it is probably just easiest to add a short month name column to your date table.

You don't want to change the default format of your date column as it will effect everything.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
TheoC
Super User
Super User

Hi @HamidBee 

 

Easiest way is to create a Calculated Column like this:

 

Column = LEFT ( Table[MonthName] , 3 )

 

If you don't want to do a new column, then click on the Month Name field and the three little dots to the right of it.  Right Click and go to New Group. Then you can name each month whatever you like 🙂

 

TheoC_0-1643236628752.png

 

 

Hope this helps 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

HamidBee
Impactful Individual
Impactful Individual

Thank you for your reply. Is it possible to create a measure instead using the code which you provided?

Hi @HamidBee, unfortunately not in this instance that I'm aware.  If you're adamant on not wanting a column, then go with the New Group approach. However, as flagged, it would be the most appropriate using the new column.

 

Note, @KNP has just provided a gif that can give you a solution to what you want by changing the formatting. That is a simple approach as keeps the current structure of your model the same, too.  I recommend using @KNP's solution.

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

HamidBee
Impactful Individual
Impactful Individual

No worries, Thank you for your help. 

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.