Forum Discussion

CalleWagenaar's avatar
CalleWagenaar
Frequent Visitor
3 years ago
Solved

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...
  • v-jianboli-msft's avatar
    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.