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
Rishabh-Maini
Helper II
Helper II

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

@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

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

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