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
Anonymous
Not applicable

MothYear column on x axis to be readable

Hi,

 

I have created MonthYear column and representing on line graph x axis.  But the column is showing as vertical values. PFA.

 

XaxisMonthYear.PNG

I want to display it horizontally or slighted tilted so that it can be readable.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I was able to do it using below :

 

Month Name = SWITCH('MLITrend'[MonthNumber],1,"January"&UNICHAR(10),2,"February"&UNICHAR(10),3,"March"&UNICHAR(10),4,"April"&UNICHAR(10),5,"May"&UNICHAR(10),6,"June"&UNICHAR(10),7,"July"&UNICHAR(10),8,"August"&UNICHAR(10),9,"September"&UNICHAR(10),10,"October"&UNICHAR(10),11,"November"&UNICHAR(10),12,"December"&UNICHAR(10))

View solution in original post

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

I would suggest you reduce the size of the labels and enlarge its width. The more useful solution is adding a space between the year and the month. Then it will take two rows automatically.

MonthYear = FORMAT([Datekey], "mmmm yyyy")

Moth-Year-column-on-x-axis-to-be-readable

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for your reply. 

I dont have a date table. I have a table in which there is a Week Column. So, I have used following dax :-

 

1) MonthNumber = MONTH('MLITrend'[Week]) 

2) Month Name = SWITCH('MLITrend'[MonthNumber],1,"January",2,"February",3,"March",4,"April",5,"May",6,"June",7,"July",8,"August",9,"September",10,"October",11,"November",12,"December")

3) Year = YEAR('MLITrend'[week])

4) MonthAndYear = CONCATENATE('MLITrend'[Month Name], 'MLITrend'[Year])

 

and this MonthAndYear column is used in line graph.  The dax which you have provided is not working on Week column.

 
Anonymous
Not applicable

I was able to do it using below :

 

Month Name = SWITCH('MLITrend'[MonthNumber],1,"January"&UNICHAR(10),2,"February"&UNICHAR(10),3,"March"&UNICHAR(10),4,"April"&UNICHAR(10),5,"May"&UNICHAR(10),6,"June"&UNICHAR(10),7,"July"&UNICHAR(10),8,"August"&UNICHAR(10),9,"September"&UNICHAR(10),10,"October"&UNICHAR(10),11,"November"&UNICHAR(10),12,"December"&UNICHAR(10))

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.