How can I use Statistical Salary Component

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.

Screenshot 2025-01-21 at 7.20.31 AM

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

Could you try placing the statistical component above the component where you’ve referenced it?

1 Like

Thank you @Void_Moon.

I never would’ve figured that out. Moving the statistical component to the top of the list allows the formulas to utilize the amount from the statistical component.

Cheers!

1 Like