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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Applying daily fee cap then proportionally dividing this cap across different entries

Hi,

 

Where I work, we charge out our time to client by hours.

 

For certain clients, we have 'day rate' fee caps, where is we work beyond a certain number of hours daily, the day rate is charged instead.

 

A simple example is below:

 

  • Associate hourly rate = $250
  • Associate day rate (triggered when >8 hrs worked) = $2000
  • So if the Associate works more than 8hrs, we will never charge beyond $2000

However, sometimes that same Associate is working across multiple projects for this client, so that day rate needs to be proportionally divided across those projects, example below:

 

Associate has worked a total of 9.5hrs across three projects on the same day as such:

1. Project A = 3.5hrs

2. Project B = 3.0hrs

3. Project C = 3.0hrs

 

As the total aggregate hours = 9.5hrs, the day rate of $2000 is triggered and applied. Currently I am calculating this manually in Excel for this particular client and then dividing the $2000 day rate proportionally by the hours worked so it calculates as below:

 

1. Project A = 3.5hrs ($2000/9.5 x 3.5 = $736.84)

2. Project B = 3.0hrs ($2000/9.5 x 3.0 = £631.58)

3. Project C = 3.0hrs  ($2000/9.5 x 3.0 = £631.58)

 

I am keen to see if it's possible to get this working in PowerBI. Currently I can only get it working for when they are working on one project daily only using a lookup table for "Hourly vs Day Rates" and applying the day rates when total daily hours >8, but am stumped as to how I could get it working when there are multiple projects being worked on that same day like in the example above? 

 

Have to admit, this is something that has been puzzling me for a few months now, so any ideas would be welcome!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , I am assuming there is date and client in the table in you table

 

You can have column or measure like

 

sub = calculate(sum(Table[Hour]), allexcept(Table, Table[Date], Table[Client]))

 

If columns then new column

if([sub] > 9, [Hour]/[Sub] *2000, [Hour]/[Sub] *250)

 

If you create a measure, then a new measure

sumx(summarize(Table, [Date], [clinet], [project], "_1", if([sub] > 9, Sum([Hour])/[Sub] *2000, sum([Hour])/[Sub] *250) ),[_1])

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I am assuming there is date and client in the table in you table

 

You can have column or measure like

 

sub = calculate(sum(Table[Hour]), allexcept(Table, Table[Date], Table[Client]))

 

If columns then new column

if([sub] > 9, [Hour]/[Sub] *2000, [Hour]/[Sub] *250)

 

If you create a measure, then a new measure

sumx(summarize(Table, [Date], [clinet], [project], "_1", if([sub] > 9, Sum([Hour])/[Sub] *2000, sum([Hour])/[Sub] *250) ),[_1])

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Awesome.

Made a slight tweak to the calculated 'Sub' column to sum by name of Associate and it's done what's needed. 

 

Thank you!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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