Forum Discussion

MKeppel's avatar
MKeppel
Frequent Visitor
4 years ago

Counting Events in Times Slots

I am looking for a way (correct measure formular) to count events in times slots, which include events when spans over a single 1 hour period..

 

Also should there be a time dimention table which is just 0-23 ? (well more likely 7 - 20 since no classes outside of the time)

 

StartDurationDayNameEnd Time
91MondayClass A10
111MondayClass B12
83MondayClass C11
102MondayClass D

12

 

Expected Results

 

Time\DayMonday
81
92
102
112
120
130

 

2 Replies

  • MKeppel , Create table using generateseries

     

    Time = generateseries (1,24,1) 

     

    then join it with start

     

    Create measure like

    count(Table[Day])+0

    • MKeppel's avatar
      MKeppel
      Frequent Visitor

      That will not achieve what I am after.

       

      If a booking goes over two houes, I want it to count +1 for each hour it is in.

       

      So I will need it to filter the counting row if the Time >= starttime & < endtime.