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

Dividing a Measure by a Column

Hi All,

 

Here is my situation - 

We are trying to calculate our building utilization by comparing how many people are returning to work and what was the original building assignment of these employees. Since we're entering a hybrid work model, this report will help us understand which buildings are being under/over utilizied. 

I have data coming in from 2 tables - 

 

BadgingTable : Contains information of all the people coming into work. Which building are they badging into, at what time, etc.

Example:

EmpID     EnterBuildingNo  EnterBadgeDate   

1                      A                  4/10/2022 

2                      B                  4/10/2022 

3                      A                  4/10/2022 

4                      C                  4/10/2022 

5                      A                  4/10/2022 

1                      C                  4/11/2022 

3                      C                  4/11/2022

4                      B                  4/11/2022 

9                      A                  4/11/2022 

1                      A                  4/12/2022 

2                      A                  4/12/2022 

4                      A                  4/12/2022 

9                      B                  4/12/2022 

12                    C                  4/12/2022 

 

Occupancy Table:

BuildingNo   AssignedSpaces

A                             10

B                              8

C                              7

The two tables are linked by the EnterBuildingNo/BuildingNo. 

I want to find out the Utilization % as a measure by Building and Date. Since it'll be a matrix with dates as columns and building numbers by rows, I can have either an average utilization or a daily utilization %

From the above example - 

Date              BuildingNo      Utilization%

4/10/2022            A                      30%

4/10/2022            B                      12.5%

4/10/2022            C                      14.3%

4/11/2022            A                      10%

4/11/2022            B                      12.5%

4/11/2022            C                      28.6%

4/12/2022            A                      30%

4/12/2022            B                      12.5%

4/12/2022            C                      14.3%

 

Any advice is greatly appreciated! 

 

Thank you

 

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You could try creating a measure like

Utilization = DIVIDE( COUNTROWS( 'Badging Table'), SELECTEDVALUE( 'Occupancy Table'[Assigned Spaces]) )

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You could try creating a measure like

Utilization = DIVIDE( COUNTROWS( 'Badging Table'), SELECTEDVALUE( 'Occupancy Table'[Assigned Spaces]) )

Thank you so much @johnt75 ! This works perfectly 

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