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())
- The X-axis are a list of companies
- Month is a number 1 - 12
- Score is... well... the score
Where am I going wrong guys?
Thanks in advance
Lewis