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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
CalleWagenaar
Frequent Visitor

How do I create a bar chart using start and end times.

Hi!
 I am trying to create a graph showing how many cars are drving at a certain hour. To do this I have start times and end times in my data.  have created a time frequancy graph based on start times, which shows how many cars start at a certain time: 
CalleWagenaar_0-1675352916641.png

 

 

However this only shows the start times. How do I get this graph to show the time inbetween the stat and the end times.
For example: 
If a car drove from 10:00 -13:00 using only start times it adds one point to 10:00. I need it to add a point to 10:00, 11:00 and 12:00. How can I do this? 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @CalleWagenaar 

 

You can try the following methods.

Sample data:

vzhangti_0-1675404779782.png

Add a table for time.

vzhangti_1-1675404815141.png

Measure =
CALCULATE ( COUNT ( 'Table'[Car] ),
    FILTER ( ALL ( 'Table' ),
        [Start Time] <= SELECTEDVALUE ( 'Time table'[Time] )
            && [End Time] >= SELECTEDVALUE ( 'Time table'[Time] )
    )
)

vzhangti_2-1675404917063.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
CalleWagenaar
Frequent Visitor

this helps however it doesn't work with multiple days. How can you combine months?

v-zhangti
Community Support
Community Support

Hi, @CalleWagenaar 

 

You can try the following methods.

Sample data:

vzhangti_0-1675404779782.png

Add a table for time.

vzhangti_1-1675404815141.png

Measure =
CALCULATE ( COUNT ( 'Table'[Car] ),
    FILTER ( ALL ( 'Table' ),
        [Start Time] <= SELECTEDVALUE ( 'Time table'[Time] )
            && [End Time] >= SELECTEDVALUE ( 'Time table'[Time] )
    )
)

vzhangti_2-1675404917063.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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