I'm having trouble programming the intelligent report with conditional calculations.
"AV" is calculated from the average of the results obtained, applying a different formula depending on the case.
The cases are as follows:
98.5% ≤ Mean ≤ 101.5% --> AV = k*s
Mean < 98.5% --> AV = 98.5 - Mean + K*s
Mean > 101.5 --> AV = Mean – 101.5 +K*s
Where k is a constant (2.4) and s is standard deviation.
I have thought about this option (as an excel formula):
=IIF(Xlan<98.5, 98.5-Xlan+2.4*Slan, IIF(Xlan>101.5, Xlan-101.5+2.4*Slan, 2.4*Slan))
- Xlan is the mean saved as variable
- Slan is the standard deviation saved as variable
but it causes me a error in the program and changes it to this:
Why doesn't the formula work?
How could I set up the formula in a simple way?
¡A lot of thanks!