Forum Discussion
SumIF less than a specified number
I'm not sure that I fully understand the issue.
Is that the measure only returns Total_hours_Per_week * Hourly_Staff_Cost as the result?
Could you upload to Dropbox/GDrive a .pbix file with dummy data?
Thanks,
PDG
hi so unfortunatly i am unable to upload a file due to time restrictions. ill try and explain a little better.
basically each staff member works a certain amount of hours per month however for financial reasons in the back ground the amount of hours is capped at the maximum for the month. basically finance will say if a staff member works 200 hours in the month of april then a cost per hour is only applied to the max number of hours for that month i.e. 187.50 hours for april. overtime is handled speratly.
the timesheet data will reflect the time recorded per staff member per week per the project they have been working on. so regardless of project i can get the total number of hours worked in this example 200. i then need to say if this total is greater than the max allowed for the month which is 187.50 then i need to cap the staff members total number of hours at 187.50 * this by the hourly staff cost to give me the total figure.
example:
staff member 1 total hours worked 200 in april
staff member 2 total hours worked 185 in april
max hours in april 187.50 varies per month (e.g. may = 150 hours)
hourly rate 15.50 - varies per staff member
formula = if 200 > 187.50 then 187.50 * 15.50 else if total hours < 187.50 then total hours * hourly rate.
staff member 1 - total cost 2906.25 (187.50 * 15.50)
staff member 2 - total cost 2867.50 (185 * 15.50)
hopefully this explains it a little better
- P_D_G5 years agoResolver III
Thanks for the expmalation. This part is clear. I'm not sure why the solution we provided is not working, which part is expected to work differnetly.
Please have a look at this PBIX file and point me in the right direction. This is what I have:
Thanks
- chris_rowley5 years agoFrequent Visitor
thank you to P_D_G
after creating some new visuals and a couple of tweaks with filters the formula now works correctly. my final figures are still slightly out but i fear there maybe something in my underlying data that could be at fault.
thank you for your assistance it has been much appreciated.