Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have been playing around with the following expression to get it to calculate correctly but I cannot get it to behave as I expect. It doesn't matter where I put the brackets it gives me an error in expression. If I leave it as is it is calculating the second part of the expression first.
All 3 part work as individual expressions.
I can add the 2 QTY together without issue and divide one of the 2 QTY figures with the variable.
I want to add the 2 QTY figures together then divide by the variable but what is actually happening is the PICK QTY is getting divided by the variable and then added to the GRN QTY.
=num(Sum ({$<Type={GRN},PONumber-={"*TRANSIT"}>}QTY)+sum({$<Type={PICK}>}QTY)/(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00')
How can I fix this so it adds first then divides?
Thanks Steve
May be this:
=Num((Sum({$<Type={GRN}, PONumber-={"*TRANSIT"}>}QTY) + Sum({$<Type={PICK}>}QTY)) /
(vTotalManHours- (vHolidays + vSickness + vHospDocsDentist + vAuthorisedAbsence + vUnauthorisedAbsence + vOvertime + vAgency)), '#,##0.00')
May be this:
=Num((Sum({$<Type={GRN}, PONumber-={"*TRANSIT"}>}QTY) + Sum({$<Type={PICK}>}QTY)) /
(vTotalManHours- (vHolidays + vSickness + vHospDocsDentist + vAuthorisedAbsence + vUnauthorisedAbsence + vOvertime + vAgency)), '#,##0.00')
try this
=Num(Sum({$<Type={'GRN'},PONumber={'*'}-{'*TRANSIT'}>}QTY)+sum({$<Type={'PICK'}>}QTY)/(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00')
=num((Sum({$< Type={GRN},PONumber-={"*TRANSIT"}>}QTY)+sum({$<Type={PICK}>}QTY)) | ||
/ |
(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00')
num((Sum ({$<Type={GRN},PONumber-={"*TRANSIT"}>}QTY)+sum({$<Type={PICK}>}QTY))/(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00')
Thanks everyone. I was in danger of putting brackets everywhere but where they needed to go.
Hi Alessandro
unfortunately this gives me the same answer as I was getting which is incorrect.
thanks anyway.
Steve