Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Monthly comparison with RAG colours

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:


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


1 Reply
Honored Contributor II

Re: Monthly comparison with RAG colours

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,


Sum({$<Area={'Overall'}, Month={$(=Max(Month)-1)}>} Score)