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
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
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.