Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When I copied this expression into a text box, I see Error: Error in expression: ')' expected.
=IF(($(vForecastRound)=0 and $(vActualRound)=0), IsNull(Null()), IF(FABS($(vNewVariance))>1,0, 1-FABS($(vNewVariance))))
I think the issue is related to FABS($(vNewVariance)) because this alone gives me the same error. Does FABS() not work in this case for some reason?
Thanks,
Cassandra
The general problem you are dealing with is the comments in your variables. The comments will get included in the expansion. So for example:
myvar = 1+1 // comment
=fabs($(myvar))
expands to:
=fabs(1+1) // comment)
Notice the right paren for fabs() is now after the comment -- a syntax error. Remove the comments from your variable defs and it will work.
How do I debug this? Remove the label from the Forecast Accuracy Expression. Now the column heading shows the expanded expression, and you can examine the full syntax.
-Rob
Does this alone works fine? -> $(vNewVariance)
Yes
What is the output of $(vNewVariance)? Can you share a screenshot?
Hi,
What do you see with what Sunny asked.
I just tested this simply with a variable with a minus in and then wrapped in FAB() and it works fine for me.
Mark
Variance is $(vNewVariance). Forecast Accuracy is where I can't get the expression to work.
Could you post a qvw? It can better help understand the situation.
Hi,
have you formatted the percentage on the table or is it actually returning 60.9%?
If the percentage sign is in the variable it maybe treated as a string.
Mark
Sample QVW attached.
The variable is not formatted with the percentage. It returns -0.6088... The formatting is done within the table.