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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.