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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Microsoft Employee
Microsoft 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.