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
julsh41
Helper II
Helper II

Writing a Measure with a Cap

I am trying to write a measure for project cost, but I would like it with a max hour cap per month.  

 

Worker A and B each salaried employees and over 2080 possible hours in a year have an effective cost $100/hr, August has 176 possible billable hours.

 

Worker A works 75 hours = 75 X 100 = Project cost of $7500

Worker B works 204 hours = 176 X 100 = Project cost of $17,600

 

While the revenue for Worker B would be based on 204, I would like the cap to be on the monthly possible hours as that person's cost for a month would not increase based on how many hours they billed since they are salaried.  

 

Can anyone help with this?  Happy to clarify if this doesn't make sense.  

 

 

3 REPLIES 3
pbeye
Resolver II
Resolver II

Would something like this work?

 

capped = IF(SUM(hoursworked) > 176, 176 * 100, SUM(hoursworked))

The complexity is I have 30 workers with their different cost rates and each month has varying possible billable hours depending on how many weekdays in the month so I can't hard code each workers cost amount or each months possible hours.    

That makes sense. I'm assuming you have both of those fields already in the daaset? If so, you should be able to just switch them out in the formula above.

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.