Forum Discussion
Using variables for percentage calculations
Your picture explains what you want, and your story explains why you aren't getting it. Thanks to your excellent post, I can help you.
First, I would recommend you set SUMTOTAL to 0 when the layer timeline starts, so it only has calculations from this visit, and not carryover numbers.
Secondly, (and this is mostly personal preference), I would group the variables. It makes them easier to visualize.
The problem is that you are not adding leaves and allowances to base before you are calculating super. I added those triggers.
You are not calculating allowances until the end of the list, but you need it before you calculate super, so I moved it up in the list, so it is available when you need it.
You are not adding leaves, allowances, and super to base before you calculate work cover. After the triggers to add base, leaves, and allowances, I copied that total to Quotient G, so it is available to calculate work cover, before super is calculated. Then I added super to it and calculated work cover.
I would suggest you don't divide by 100, but use the corresponding decimals to multiply. Instead of dividing base by 100, then multiplying by 7.67 for annual leave, just multiply by.0767. Mathematically, you get virtually (there might be some slight differences in how things are rounded) the same answer, but it only takes half as many steps. With fewer triggers, it is easier to track, and may speed the calculations.
Starting with Staff cost per week, both my version and my calculator diverge from the numbers on the picture. Maybe it's rounding, or I don't know what all should be included when.
Any questions, please ask.