Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table chart and some of the measures uses a expression to calculate the result, the expressions use a variable which is set via an input box, it just stores a numeric value. One of the expression does not change when the variable is changed, and commenting out the variable has no effect so it clearly just being ignored.
This is the expression i want to use:
(
Sum(Incurred_IBNR)
+
(
IF(count(Incurred_IBNR)>=1,0,
IF(ROUND(Sum(Earn_Net)/Sum(net_to_uw),0.01)=1,0,
(
(SUM((Incurred_IBNR)*1.03)Sum(Incurred_IBNR))
*
'$(vPercentage)'
)* (1 (Sum(Earn_Net)/Sum(net_to_uw)))
)
)
)
)/Sum(Earn_Net)
If i remove the initial IF statement then the variable is used in the calculation:
(
Sum(Incurred_IBNR)
+
(
IF(ROUND(Sum(Earn_Net)/Sum(net_to_uw),0.01)=1,0,
(
(SUM((Incurred_IBNR)*1.03)Sum(Incurred_IBNR))
*
'$(vPercentage)'
)* (1 (Sum(Earn_Net)/Sum(net_to_uw)))
)
)
)/Sum(Earn_Net)
the issue is not caused by just being in a nested IF statement as i have tried a dummy nested IF scenario and its works.
Can anybody shed any light in why this expression does not take the variable into account?
Your if condition is true which is forcing your expression to be 0
IF(count({$<hcc={1}>}inc) >= 1,0,
IF(ROUND(Sum(earned)/Sum(n2u),0.01)=1,0,
( (SUM(TOTAL (inc)*1.03)

Sum(TOTAL inc))
*
'$(vPercentage)'
)
* (1 (Sum(earned)/Sum(n2u)))
))
It would be difficult to look just the expression and know what is going wrong. Would you be able to share a sample so that we can check it out a little more?
I have attached a stripped down example, if you change the variable vPercentage you will see one of the results changes and the other does not even though it should do.
Your if condition is true which is forcing your expression to be 0
IF(count({$<hcc={1}>}inc) >= 1,0,
IF(ROUND(Sum(earned)/Sum(n2u),0.01)=1,0,
( (SUM(TOTAL (inc)*1.03)

Sum(TOTAL inc))
*
'$(vPercentage)'
)
* (1 (Sum(earned)/Sum(n2u)))
))