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
AndHan
Frequent Visitor

Calculate occupancy at specific datetime

I'm working on a Power BI project, where I'm trying to visualize occupancy on a parkinglot vs time.

A parking bay can either be Occupied or Free and only have one state at any given time.

 

What I would like is to visualize is how many bays were occupied at a specific time (for example yesterday at 12 am or 3pm) on a graph.

I have a datetable with all the timestamps for my X-axis.

 

How can I calculate what state a bay had at any given time? 

When visualizing the occupancy the occupied + free bays should at all times equal the total amount of bays at the parking lot.

 

An example of my data is in the following format: 

bayIDstatus_startTimeendTimestatus
12020-10-13 05:37:27Z2020-10-13 12:02:42.6593146 +02:00Occupied
12020-10-13 10:02:40Z2020-10-13 12:02:58.5031439 +02:00Free
12020-10-13 10:02:56Z2020-10-13 12:04:03.1440793 +02:00Occupied
22020-10-13 10:04:00Z2020-10-13 12:04:23.4098165 +02:00Free
22020-10-13 10:04:22Z2020-10-13 15:04:40.0415468 +02:00Occupied
32020-10-13 13:04:31Z2020-10-13 18:40:10.8539946 +02:00Occupied
12020-10-13 16:40:08Z2020-10-13 18:45:58.7620901 +02:00Free
12020-10-13 16:45:57Z2020-10-13 18:49:01.7630668 +02:00Occupied
2 REPLIES 2
BA_Pete
Super User
Super User

Hi @AndHan ,

 

Can you share your data example in table format please? You can find it here on the response window:

arrakha.PNG

 This will make it much easier/quicker for people to grab your data and help you.

 

Thanks,

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Sure - I have updated the post 🙂

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