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
crobaseball
Helper II
Helper II

month-year format on x-axis instead of year-month

I have a clustered column chart which looks like below.  As you can see the format shows as year-month.  I do NOT want to unconcatenate the x-axis but instead want to have the format as month-year.  Can't for the life of me figure this out.  Is there an easy way to do this or do i need to create a date table in order to accomplish this?

 

crobaseball_0-1623687215895.png

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@crobaseball 

if you have a datetime table then create a column

month-year = FORMAT('Table (2)'[date],"mmm")&year('Table (2)'[date])

if you don't have a datetime table, then create this column in the fact table





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
crobaseball
Helper II
Helper II

thanks!!

ryan_mayu
Super User
Super User

@crobaseball 

if you have a datetime table then create a column

month-year = FORMAT('Table (2)'[date],"mmm")&year('Table (2)'[date])

if you don't have a datetime table, then create this column in the fact table





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Actually, there's another problem.  The sort now takes place by alphabetical instead of by time.  How do I solve this issue?

Ok, I'm being picky, but when I tried to put a space in after 'mmm' to 'mmm ' it went to this.  I also just tried to put a space in, 

month-year = FORMAT('HVCU_sessions_new_vs_returning05-19to05-21'[Date (Year Month)],"mmm ")& " "&year('HVCU_sessions_new_vs_returning05-19to05-21'[Date (Year Month)])
which also returned the below snapshot.  is there a way to keep the diagonal look?

 

crobaseball_0-1623688249779.png

 

@crobaseball 

I didn't find the settings for that. I think that depends on the size of your visual

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.