Forum Discussion
CalleWagenaar
3 years agoFrequent Visitor
How to create a bar chart using start and end times.
I have another questin now. 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 gr...
- 3 years ago
Hi CalleWagenaar ,
Based on your description, I have created a simple sample:
Please try:
First create a new time table:
Then create a measure:
Measure = SUMX('Table',IF([Start Time]<=MAX('Time'[Time])&&[End Time]>=MAX('Time'[Time]),1))Apply it to the visual:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
Super User
3 years agoIn Power Query you can use List.Generate to create the time series for each car (with hourly granularity), from Start date/hour to end date/hour. Then you can use these calculated data points in your visual.