If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hi,
I have the following calculation (below) which is doing what I need it to, but I want my KPI color to change dependent on whether the number is a positive or negative.
If positive, I want the number to be Green, if Negative, then Red. Any idea how I would do this please?
(sum({$<Year={'2020'}>} [sales]) - sum({$<Year={'2019'}>} [sales]))
/
sum({$<Year={'2019'}>} [sales])
IF( ((sum({$<Year={'2020'}>} [sales])-sum({$<Year={'2019'}>} [sales]))/sum({$<Year={'2019'}>} [sales]))<0,
red(),
green()
)
thanks for the suggestion, but it doesn't seem to work. Regardless on whether the KPI number is a positive or negative, the colour stays Red.
Can you share the screenshot of the expression you used?