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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
molzmad
Helper I
Helper I

Cumulative total/Occupancy help

Hi,

I'm basically trying to figure out an occupancy calculation based on people entering/exiting a club, i'm also wanting this reset at 4am every day when the club closes. Would anyone know how to do this ?

 

Picture posted below

 

I'm Pretty new to power bi and cant seem to figure it out, thanks 🙂 

 

Untitled.png

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

This looks great.  As for the 4am cutoff - that is easy to do - you can subtract 1/6 from the event_time value to shift the day assignment.

 

Weekday = FORMAT('Table'[event_time]-1/6,"DDDD")
 
You don't need any of the other calculated columns, just sum in_or_out
 
lbendlin_0-1616431209247.png

You may want to add a weekday sort column.

wd = WEEKDAY('Table'[event_time]-1/6,2)
 
lbendlin_1-1616431431152.png

 

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @molzmad ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.
 
Best Regards
Lucien
 
lbendlin
Super User
Super User

This looks great.  As for the 4am cutoff - that is easy to do - you can subtract 1/6 from the event_time value to shift the day assignment.

 

Weekday = FORMAT('Table'[event_time]-1/6,"DDDD")
 
You don't need any of the other calculated columns, just sum in_or_out
 
lbendlin_0-1616431209247.png

You may want to add a weekday sort column.

wd = WEEKDAY('Table'[event_time]-1/6,2)
 
lbendlin_1-1616431431152.png

 

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) and show the expected outcome.

https://drive.google.com/file/d/1WBVg1oMoV36Jl8yBzWVHK5c33TtjbYFg/view?usp=sharing 

 

Hey, here is the data ^ , i would like the outcome to be the occupancy of people in the building as seen in the picture below based on ins (1) and outs (-1) - i would also like the occupancy to reset at 4am every day.

 

Thanks so much, i really appreciate your help.

1.png

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors