Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an if statement:
IF($(vForecastVarianceMTD) < 0,
rgb(255, 0, 0),
rgb(0, 153, 0))
The goal here is to make red if negative, and green if >= 0. I am currently getting the error: Error in expression: ')' expected. Not sure where the ')' is expected, but when I look at the sample script below, it outputs the full expression for the variable but it does not show the < 0, prior to showing the rgb part. When I put just the variable in a KPI it shows the value that I expect it to show. Any thoughts from the community?
seems your logic looks good,
can you try by placing the actual expression in if statement.
IF(sum(sales) < 0,rgb(255, 0, 0),rgb(0, 153, 0))
What is inside your vForecastVarianceMTD variable and where are you trying to apply this ?
seems your logic looks good,
can you try by placing the actual expression in if statement.
IF(sum(sales) < 0,rgb(255, 0, 0),rgb(0, 153, 0))
There was an extra parenthesis in the statement for the variable -- when I put that expression on its own there was no issue because nothing else was coming after, which is why it allowed an output I presume, but then when put in variable form it could not interact with the rest of the expression because of that extra parentheses. Was able to resolve this by putting the entire expression in the if statement and troubleshooting that way.
There was an extra parenthesis in the statement for the variable -- when I put that expression on its own there was no issue because nothing else was coming after, which is why it allowed an output I presume, but then when put in variable form it could not interact with the rest of the expression because of that extra parentheses. Was able to resolve this by putting the entire expression in the if statement and troubleshooting that way.