cancel
Showing results for 
Search instead for 
Did you mean: 
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 II
Super User II

@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 II
Super User II

@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

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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors