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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MKeppel
Frequent Visitor

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 2
amitchandak
Super User
Super User

@MKeppel , Create table using generateseries

 

Time = generateseries (1,24,1) 

 

then join it with start

 

Create measure like

count(Table[Day])+0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors