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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors