Reply
Rishabh-Maini
Helper II
Helper II
Partially syndicated - Outbound

Date on x-axis shows date time when the column is only date

Hi,

I'm using a "Date only" column on the X-axis of a line chart. 
The line chart seems to work fine until there are 5 or less dates to be displayed. In this case, the date is diplayed as date time. 

With 3 dates selected, the time is displayed along with the dateWith 3 dates selected, the time is displayed along with the date
With more than 5 dates selected, only the dates are visible.With more than 5 dates selected, only the dates are visible.
Here's the date field
Capture-3.PNG
I have even made sure the date field is formatted as "Date" in the modelling tab. Any suggestions on why this might be happening?

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

Syndicated - Outbound

@Rishabh-Maini when you are using date on the x-axis with the type "Continuous", you have no control over the format on how the date shows up on x-axis. I think there is an idea on the ideas forum for this, vote for it.

 

I think for now, either you have to live with the date/time when fewer dates are there or change the grain to maybe year/month based on your needs.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

Syndicated - Outbound

@Rishabh-Maini when you are using date on the x-axis with the type "Continuous", you have no control over the format on how the date shows up on x-axis. I think there is an idea on the ideas forum for this, vote for it.

 

I think for now, either you have to live with the date/time when fewer dates are there or change the grain to maybe year/month based on your needs.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Syndicated - Outbound

@parry2k yes, looks like powerbi is built this way. Thanks for your reply!

HashamNiaz
Solution Sage
Solution Sage

Syndicated - Outbound

Hi @Rishabh-Maini !

 

Please change the X-Axis type from continuos to categorical as shown below;

 

CategoricalCategorical

 

Regards,

Hasham

Syndicated - Outbound

Hi @HashamNiaz ,
thank you for your reply!

The date field has data for over a year, and changing it to categorical will display each and every date on the axis, which will eventually crowd the visual. 

For example, this is what it looks like if i filter it for 1 year.

Capture-4.PNG

Syndicated - Outbound

Hi @Rishabh-Maini !

 

You cna use Year or Month level grain based on your requirement, or do you really want to see whole year analysis based on daily grain. You can set the grain by using correct hirerichal level from Date dimension.

 

Regards,

Hasham

Syndicated - Outbound

Hi @HashamNiaz !

The client has to have the flexiblity of viewing the entire year or a single day. 
I think this is just the functionality of PowerBI, a continuous date field is displayed as a date time even if it isn't (when such a small date frame is used).
Thank you for your reply!

avatar user

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 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 (Last Month)
Top Kudoed Authors (Last Month)