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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
snilss91
Frequent Visitor

Visualize bookings

Hi everyone!

 

I'm trying to visualize the bookings of different rooms and I have sample data below. I have Start Dates with time and End Dates with time and have created the column Booked Dates that goes from start to end with an increment of 1 hour.

 

Any ideas how I can visualize the booked time vs. the unbooked time? General tips would be greatly appreciated as I'm stuck. I would like to be able to show the intensity of the bookings, like for a gym, both with weekday and time of day. I've tried many approaches, for example counting the number of DistinctFridays, which  consistently return one day less than what is booked. Index for Booking = 0 is booked two Fridays, but it returns 1. 

 

DistinctFridays =
SUMX(
    VALUES('TEST'[Index for Booking]),
    VAR CurrentBookingIndex = 'TEST'[Index for Booking]
    VAR DistinctFridayDates =
        SUMX(
            VALUES('TEST'[Dates Booked]),
            VAR TESTAR =
                CALCULATE(
                    COUNTROWS('TEST'),
                    FILTER(
                        ALL('TEST'),
                        'TEST'[Weekday Name] = "Friday" &&
                        'TEST'[Index for Booking] = CurrentBookingIndex &&
                        'TEST'[Dates Booked] = EARLIER('TEST'[Dates Booked])
                    )
                )
            RETURN
                IF(TESTAR > 0, 1, 0)
        )
    RETURN
        DistinctFridayDates
)

 

 

 

Index for OrderIndex for BookingLab Area RoomLab AreaRoomStart DateEnd DateDates BookedWeekday NameSingle DayDuration DaysDuration HoursDuration Days GroupingDuration Days Grouping Index

00PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 09:00:00FridayFALSE71793 - 7 days3
10PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 10:00:00FridayFALSE71793 - 7 days3
20PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 11:00:00FridayFALSE71793 - 7 days3
30PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 12:00:00FridayFALSE71793 - 7 days3
40PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 13:00:00FridayFALSE71793 - 7 days3
50PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 14:00:00FridayFALSE71793 - 7 days3
60PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 15:00:00FridayFALSE71793 - 7 days3
70PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 16:00:00FridayFALSE71793 - 7 days3
80PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 17:00:00FridayFALSE71793 - 7 days3
90PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 18:00:00FridayFALSE71793 - 7 days3
100PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 19:00:00FridayFALSE71793 - 7 days3
110PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 20:00:00FridayFALSE71793 - 7 days3
120PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 21:00:00FridayFALSE71793 - 7 days3
130PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 22:00:00FridayFALSE71793 - 7 days3
140PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-18 23:00:00FridayFALSE71793 - 7 days3
150PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-19 00:00:00SaturdayFALSE71793 - 7 days3
160PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-19 01:00:00SaturdayFALSE71793 - 7 days3
170PV23.3,P02PV23.3P022023-08-18 09:00:002023-08-25 20:00:002023-08-19 02:00:00SaturdayFALSE71793 - 7 days3
1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @snilss91  -  I recommend using a heatmap-style visualization and some DAX measures to properly count booked vs. unbooked time. i have created dax measure in attachment. please check attached pbix file FYR

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @snilss91  -  I recommend using a heatmap-style visualization and some DAX measures to properly count booked vs. unbooked time. i have created dax measure in attachment. please check attached pbix file FYR

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Great, thank you! Now I have a bit more to work with.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.