Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have variables: vCustomColor1,vCustomColor2,vCustomColor3... and a Field SampleRank()1,2,3...
I want to create a build a variable dynamically: =$(='vCustomColor'&SampleRank)
This works if I select 1 Sample, however It does not work when I use SampleRank as dimension of a table, where each column provides a different Rank (1,2,3...)
What am I missing?
Best Regards
Can you please explain with example what you actually want with sample qlikview file or screenshot.
Regards
Ahmar
You are creating with =$(='vCustomColor'&SampleRank) a new adhoc-variable which could only have one value at the same time. This meant it couldn't be used to evaluate anything on a row-level else it will be caluclated once before the chart is calculated an applied to each row.
As alternatively you could use an expression like this:
pick(match(SimpleRank, 1,2,3, ...),
vCustomColor1,vCustomColor2,vCustomColor3, ...)
A further approach might be this here: Colors in charts
- Marcus
Try to create colour at back end..
Coloring is not my problem. Dynamically specifying a variable, however, is.
Thank you for your suggestion.
My hack works only under the restriction that there are only a limited number of rows, which I enforce.
your suggestion appears to make that restriction explicit. I will try it.