Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
tecumseh
Resolver I
Resolver I

Consistently Force Two Digit Year To Second Row Of X Axis

Hi,

Using PBID Oct, 2024.

How can I consistently force the 2 digit year onto a second row on the x axis?
As you see in the screen shot, every time the month initial is "J" the 2 digit year is on the first row even though I have UNICHAR(10) in my DAX Code

Thanks,
w

DAX

MonthName_1 = 
VAR __Charcter = UNICHAR(8203)
VAR _MonthNbr = [MonthNumber]

RETURN
LEFT('Date Table'[MonthName],1) & REPT(__Charcter,_MonthNbr) & UNICHAR(10) & 'Date Table'[Year_2Char]

 

col chart year error.png

1 ACCEPTED SOLUTION
v-mengmli-msft
Community Support
Community Support

Hi @tecumseh ,

 

As far as I know, the X-axis of the visual does not support text wrapping at the moment. But if your visual is small enough, the text on the X-axis will wrap based on space at smaller width.

Date_2 = LEFT(FORMAT('Table'[Date],"MMM"),1)&" "&FORMAT('Table'[Date],"yy")

vmengmlimsft_0-1734417236041.png

 

 

 

Best regards,

Mengmeng Li

View solution in original post

6 REPLIES 6
v-mengmli-msft
Community Support
Community Support

Hi @tecumseh ,

 

As far as I know, the X-axis of the visual does not support text wrapping at the moment. But if your visual is small enough, the text on the X-axis will wrap based on space at smaller width.

Date_2 = LEFT(FORMAT('Table'[Date],"MMM"),1)&" "&FORMAT('Table'[Date],"yy")

vmengmlimsft_0-1734417236041.png

 

 

 

Best regards,

Mengmeng Li

Thanks @v-mengmli-msft ,

I decreased the width of the visual a bit now year is consistently on row 2 of the x axis.

 

Thanks,

-w

tecumseh
Resolver I
Resolver I

@lbendlin ,

Thanks.

I removed the UNICHAR(10) and year from the DAX and added the year in hierarchy
Exact same problem in the chart for all months with the initial "J"
col chart year error_hierarchy.png

I believe the context is sufficient to avoid confusion
1 initial for month format is very common in financial charts

Thanks,
w

I played with this a bit and I don't think you will be able to do this with the standard column chart visual types. You would have to look at custom visuals like Deneb that allow you free placement of the axis labels.

Played with it some more.  You would need to tightly control the width of the visual

 

lbendlin_1-1734397318737.png

 

lbendlin
Super User
Super User

Not possible with the standard formatter.  Instead use a hierarchy.

 

NOTE: you have three months in the year starting with J, two with M and two with A.  Make sure this is not confusing to anyone.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.