Discussion board where members can get started with Qlik Sense.
I want to create ranges of colors using an expression and I want to do it by dividing the range in equal amplitudes (min-max / 3, max / 3-max * 2/3 and max * 2/3-max)
The problem I have is that when I want to set the ranges, it puts as if all the values are in the highest range.
The expression I am using is the following:
= If ($ (vShareClientsZC) <Max (Aggr (Count (distinct ClientId) / sum (HomesxMzna), AppleKey)) / 3, '# ff0b05',
If ($ (vShareClientsZC) <Max (Aggr (Count (distinct ClientId) / sum (HomesxMzna), AppleKey)) * 2/3, '# ffff05',
if (IsNull ($ (vShareClientesZC)), '# ff0b05', '# 40ff00')))
What I think is happening is that Qlik is comparing each share with the same share value divided 3, etc ... It is not comparing it with the max value of share of all the rows.
Does anybody know how I can fix it?
Thank you very much in advance.
Go to Solution.
I am missing some context, i.e. where are you using this expression, what's the definition of your variable.
Maybe add a TOTAL qualifier to your max() outer aggregation:
Max (TOTAL Aggr (Count (distinct ClientId) / sum (HomesxMzna), AppleKey))
Thanks a lot...