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 Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors