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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lamysroe
Advocate I
Advocate I

Using filters in measures to determine utilization

Hi - I am looking to get utilization rates of many rooms. I have the basic formula of duration/works hours, but I am having issues getting a formula that works with the filter selection. 

 

So... When I select multiple conference rooms, I need the formula to account for this and take my available work hours and mulitply it by X# of rooms selected. 

 

This is the formula I have comeup with but it doesn't work due to SUM restrictions. 

 

 

 

Utilization Combined = DIVIDE(SUM('Meetings'[Duration]),SUM('Calendar'[Work Hours Actual] *FILTER(Meetings,Meetings[Room])),0)

 

 

 

1 ACCEPTED SOLUTION
lamysroe
Advocate I
Advocate I

I am using a many to one relationship with the date of the meeting (many) to the date on the calendar (one). With that being said, I figured it out. 

 

I used existing column Duration 

I made a new measure:   CalcWorkHours = SUM('Calendar'[Work Hours Actual Yearly]) * DISTINCTCOUNT(Meetings[Room])

DISTINCTCOUNT accounts for the number of meeting rooms selected in the filter. From there I creatd another measure.

Utilization = DIVIDE(SUM('Meetings'[Duration]),[CalcWorkHours])

 

 

View solution in original post

3 REPLIES 3
lamysroe
Advocate I
Advocate I

I am using a many to one relationship with the date of the meeting (many) to the date on the calendar (one). With that being said, I figured it out. 

 

I used existing column Duration 

I made a new measure:   CalcWorkHours = SUM('Calendar'[Work Hours Actual Yearly]) * DISTINCTCOUNT(Meetings[Room])

DISTINCTCOUNT accounts for the number of meeting rooms selected in the filter. From there I creatd another measure.

Utilization = DIVIDE(SUM('Meetings'[Duration]),[CalcWorkHours])

 

 

v-chuncz-msft
Community Support
Community Support

@lamysroe 

 

You might need to use SUMX function.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
az38
Community Champion
Community Champion

Hi @lamysroe 

its difficult to create solution without data model

whats relationships have your Calendar table?

what do you mean with this statement?

FILTER(Meetings,Meetings[Room])

 multiplier 

SUM('Meetings'[Duration])

will give you sum of ALL meeting duration from your data model.

so, the better way - give us example of your data tables for help

do not hesitate to kudo useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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