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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Line chart x-axis showing day # instead of actual date

I have a line chart that is simply couting days and plotting the number of rows by date from left to right. When I show the data by month it looks fine but I want to show it by day (e.g. 2/26, 2/27, 2/28, etc) it just shows numbers

 

Here is by month...which looks good:

count by month.png

 

 

 

 

 

 

 

 

 

 

 

Here is by day, which is not what I want. How do I change this show it shows the actual days?

count by day.png

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

Hi,

 

Please try to create this column:

Column = FORMAT('Table'[Date],"MMMM")&"-"&DAY('Table'[Date])

Then add an index column to this table, After Apply&Close, sort this column by [Index].

Add this column to line chart visual instead of [Date].[Day], the result shows:

2.PNG 

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

4 REPLIES 4
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try to create this column:

Column = FORMAT('Table'[Date],"MMMM")&"-"&DAY('Table'[Date])

Then add an index column to this table, After Apply&Close, sort this column by [Index].

Add this column to line chart visual instead of [Date].[Day], the result shows:

2.PNG 

Hope this helps.

 

Best Regards,

Giotto Zhi

dedelman_clng
Community Champion
Community Champion

Click on the dropdown for Load Date Adj and select "Date" instead of "Date Hierarchy".

2020-02-26 13_20_30-IT Spend - Power BI Desktop.png

You can then format Load Date Adj to show as much or as little of the date as you want. Then change the X axis to Categorical (this may make the chart get really big on the X axis)

 

Alternatively you can keep Month and Day, and just drill down to the Day level.

2020-02-26 13_27_16-IT Spend - Power BI Desktop.png

Concatenate or do not concatenate labels as desired.

 

Hope this helps

David

This is great, Thanks for share your knowledge. 

This is awesome. So much simpler than writing an unnecessary complicated Dax formula or coding a new column. Thank you!

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors