I’m confused about Statistical Salary Component. I created a statistical component as a deduction. I add this component to salary structure and try to use the abbreviation of the statistical component in the formula of another deduction component. The statistical component is ignored in the formula.
When writing the formula, I can see my statistical component show up in the autocomplete options.
When are we “allowed” to use statistical component in formula of another deduction?
Checking the box “Depends on Payment” days for the statistical component seemed to help in the above example. I think my problem might be related to using the variable for statistical component multiple times in the same formula. Below is where I’d really like to use the statistical component. It seems once the variable is used more than once, the system thinks it’s a local variable, see screenshot below.
This is the whole formula where I’d like to utilize statistical component.
(((gross_pay+3333)-1250)*0.1) + (0 + fedplus) if (gross_pay+3333) > 1250 and (gross_pay+3333) < 2243 else
(((gross_pay+3333)-2243)*0.12) + (99.38 + fedplus) if (gross_pay+3333) > 2243 and (gross_pay+3333) < 5289 else
(((gross_pay+3333)-5289)*0.22) + (464.88 + fedplus) if (gross_pay+3333) > 5289 and (gross_pay+3333) < 9862 else
(((gross_pay+3333)-9862)*0.24) + (1470.92 + fedplus) if (gross_pay+3333) > 9862 and (gross_pay+3333) < 17691 else
(((gross_pay+3333)-17691)*0.32) + (3349.92 + fedplus) if (gross_pay+3333) > 17691 and (gross_pay+3333) < 22127 else
(((gross_pay+3333)-22127)*0.35) + (4769.25 + fedplus) if (gross_pay+3333) > 22127 and (gross_pay+3333) < 32566 else
(((gross_pay+3333)-32566)*0.37) + (8423.1 + fedplus) if (gross_pay+3333) > 32566 else
0