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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
JohnCowx
Frequent Visitor

Dynamic % utilisation

Hi

I am calculating % space utilisation of a floor and want to dynamically adjust the % utilisation based on a user changing start and end time parameters (eg 9am to 5pm).

I have successfully calculated the % utilisation so far using static defined start and end times.

1. emove or truncate event times which do not fall into the defined time period.

2. A calculated column gets the difference between the start and end of an event (someone sitting at a position): 

Event_Space_Merge[TimeSinceLastEvent]

3. A measure to sum the calculated column together across a building/ floor:
SumTimeUsed = calculate(sum(Event_Space_Merge[TimeSinceLastEvent]),Event_Space_Merge[Event.state]=0)
4. and finally the utilisation:
Utilization_Occupied = calculate([SumTimeUsed]/([NumDevices_Floor]*[MinutesInDay]))
 
The above does not work with changing parameters as the column values are fixed. I want someone to be able to select their own start and end times and the results to change dynamically.
 
So far the closest I've come using measures is I calculate the difference in time for each row through measures: 
Time_SinceLastEvent = DATEDIFF([Time_Value_Previous],[Time_Value_Current],MINUTE)
 - but when I come to sum each row's time difference SUM(Time_SinceLastEvent) I am getting an error which basically says I need a column to compute against.
 
How can I make this work to dynamically accept the parameters and sum each row's time to calculate the % utilisation?
1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.