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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors