Reply
mkz81
Frequent Visitor
Partially syndicated - Outbound

How to build line chart date and time based?

Hi! I'm trying to build a line chart where X-axis would be date and time binded. Although I've built date and time tables my chart doesn't represent data sequentially i.e. date and time based. Instead it devides data by date/time i.e. shows all values associated with particular date/time. What am I missing? How to ensure the chart would represent values continiously? Thank you! 

PowerBI file 

 

 

1 ACCEPTED SOLUTION

Syndicated - Outbound

Having separate Date and Time columns is very good practice for exactly the reason I mention (the blue "i"). But if you want a continuous X axis (as you seem to imply) then the continuous value column is your only good option.

 

Try not to fall into the trap of attempting to dictate to your report users how they should navigate your report UI. Embrace the Power BI way of doing things.

View solution in original post

4 REPLIES 4
Kedar_Pande
Super User
Super User

Syndicated - Outbound

@mkz81 

Combine Date and Time into a Single Column

DateTimeCombined = 'Table'[Date] + 'Table'[Time]

Go to the "Format" pane for the line chart.
Under "X-axis," set the type to Continuous.

 

Make sure DateTimeCombined is added to the X-axis.
Ensure that the Values field of the chart uses the correct aggregation (e.g., Sum, Average, etc.).

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

lbendlin
Super User
Super User

Syndicated - Outbound

Yeah, tough.  You'll need to make compromises. 

 

Use a DateTime column for the continuous X axis and let the visual handle the axis legend.  Use Zoom Sliders for a better UX.

 

NOTE:  Blue "i"  - too many data points.

 

lbendlin_1-1734823215340.png

 

Syndicated - Outbound

Hi Ibendlin! Thank you for the proposal! I actually split the time/date column hoping to use my Date and Time tables. Is there a way of doing it instead of using concatenated column?

Syndicated - Outbound

Having separate Date and Time columns is very good practice for exactly the reason I mention (the blue "i"). But if you want a continuous X axis (as you seem to imply) then the continuous value column is your only good option.

 

Try not to fall into the trap of attempting to dictate to your report users how they should navigate your report UI. Embrace the Power BI way of doing things.

avatar user

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 (Last Month)
Top Kudoed Authors (Last Month)