Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys
I need some assistance. I think I might be missing something in my expression I am trying to incorporate my IF statement to change negative % to Red and positive to Green.
Below is my expression
if(
Sum({<Year = {$(vMaxYear)} >} NetSalesValue)-Sum({<Year = {$(vMaxYear)} >} CostValue)
/
Sum({<Year = {$(vMaxYear)} >} NetSalesValue)
-
Sum({<Year = {$(vMaxYear)} >} [GP Budget])
/
Sum({<Year = {$(vMaxYear)} >} [NetSalesValue Budget])
>=0.01,'Green','Red')
Without the IF my expression works perfectly, but when I incorporate my IF statement, you can see below how it apply the background colour.
What am I doing wrong?
Regards,
Melissa
HI there,
Syntax looks ok, but might be down to the dimensionality. Try the below.
if(
(
Sum({<Year = {$(vMaxYear)} >} NetSalesValue)-Sum({<Year = {$(vMaxYear)} >} CostValue)
/
Sum({<Year = {$(vMaxYear)} >} NetSalesValue)
-
Sum({<Year = {$(vMaxYear)} >} [GP Budget])
/
Sum({<Year = {$(vMaxYear)} >} [NetSalesValue Budget])
)
>=0.01,'Green','Red')
Hello Mark
I have tried that as well and see below the results. I am really baffled by this one 🙂
Makes almost all negatives green and then a few random one's red....
Brilliant, thanks man!