Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I'm trying to code a vertical bar chart that compares the latest month's score with the previous month and colours the latest month's bar Red or Green.
The problem I'm getting is that IF statement I'm using to change the 'Background Colour' attribute in the expression isn't splitting by dimension, but instead taking a sum of the whole data set.
Here's the expression I'm using:
=if(
Sum({$<Area={'Overall'}, Month={$(=Max(Month))}>} Score) < Sum({$<Area={'Overall'}, Month={$(=Max(Month)-1)}>} Score),
lightred(), green())
Where am I going wrong guys?
Thanks in advance
Lewis
would be nice to have some sample data...
Does the code deliver the correct results (select for one company and copy sniplets only, i.e.
Sum({$<Area={'Overall'}, Month={$(=Max(Month))}>} Score) should deliver correct results,
likewise
Sum({$<Area={'Overall'}, Month={$(=Max(Month)-1)}>} Score)
Peter