Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am having a issue while trying to establish a color by expression on a chart layer. Every time the number of items is bigger than 1, the color is gray.
Dimension = Country
Slice = Rank
Measure: # Items
If I use the color by dimension (Slice) I get the correct visualization with the Qlik Sense default colors. When I try to use the color by expression:
=if( Rank<=20, 'green', if (Rank>20 and Rank<=40, 'yellow', if (Rank>40, 'red')))
The expression work but only when the #Items = 1, as soon as I get more than one, the color goes to gray.
Does anyone know how to solve this issue?
Thank you,
Pamela
Try this:
=if( Only(Rank)<=20, 'green', if (Only(Rank)>20 and Only(Rank)<=40, 'yellow', if (Only(Rank)>40, 'red')))