Forum Discussion
CalleWagenaar
3 years agoFrequent 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 star...
- 3 years ago
Hi, CalleWagenaar
You can try the following methods.
Sample data:
Add a table for time.
Measure = CALCULATE ( COUNT ( 'Table'[Car] ), FILTER ( ALL ( 'Table' ), [Start Time] <= SELECTEDVALUE ( 'Time table'[Time] ) && [End Time] >= SELECTEDVALUE ( 'Time table'[Time] ) ) )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.
v-zhangti
3 years agoCommunity Support
Hi, CalleWagenaar
You can try the following methods.
Sample data:
Add a table for time.
Measure =
CALCULATE ( COUNT ( 'Table'[Car] ),
FILTER ( ALL ( 'Table' ),
[Start Time] <= SELECTEDVALUE ( 'Time table'[Time] )
&& [End Time] >= SELECTEDVALUE ( 'Time table'[Time] )
)
)
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.