cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rishabh-Maini
Frequent Visitor

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 III
Super User III

@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.






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 III
Super User III

@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.






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

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

HashamNiaz
Solution Sage
Solution Sage

Hi @Rishabh-Maini !

 

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

 

CategoricalCategorical

 

Regards,

Hasham

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

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

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!

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors