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
tonedeaff
New Member

Number of events in time intervals, using start and finish time

Hi All, 

 

I am stuck on this and would appreciate some help.

 

I have data for a range of booking events across various rooms which have a start time and finish time. I want to visualise and analyse the volume of bookings across the day - so identifying the number of bookings that occur across a 24hr time period at 30min intervals. 

 

Sample data:

tonedeaff_0-1683328128932.png

 

What I'm hoping to visualise is something like this:

tonedeaff_1-1683328237964.png

 

I've attached a PBIX with this example.

 

Thanks in advance for any help!

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @tonedeaff 

 

I add two Dim tables (Dim Date & Dim Hour) to your model and build relationships like below. 

vjingzhang_0-1683612202485.png

And add three columns with DAX to 'Appointment' table as below. 

vjingzhang_1-1683612284793.png

Then I can use the following measure to calculate the number of bookings per time period. The sample file has been attached at bottom. 

Measure = COUNTROWS(FILTER(ALLSELECTED('Appointment'),'Appointment'[Start Time Value]<=SELECTEDVALUE('Dim Hour'[Value]) && 'Appointment'[End Time Value]>SELECTEDVALUE('Dim Hour'[Value])))

vjingzhang_2-1683612332969.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @tonedeaff 

 

I add two Dim tables (Dim Date & Dim Hour) to your model and build relationships like below. 

vjingzhang_0-1683612202485.png

And add three columns with DAX to 'Appointment' table as below. 

vjingzhang_1-1683612284793.png

Then I can use the following measure to calculate the number of bookings per time period. The sample file has been attached at bottom. 

Measure = COUNTROWS(FILTER(ALLSELECTED('Appointment'),'Appointment'[Start Time Value]<=SELECTEDVALUE('Dim Hour'[Value]) && 'Appointment'[End Time Value]>SELECTEDVALUE('Dim Hour'[Value])))

vjingzhang_2-1683612332969.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

@v-jingzhang could this solution be expanded to do exactly same thing only this time to consider based on weekdays as well? On Mondays we have this many sloys available, Tuesday and so on?

Thank you @v-jingzhang ! 😊

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors