Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm trying to create a background expression formula that is dynamic and picks the variable based on an expression. I've done this in QV before but it doesn't seem to work in QS.
I've tried several combinations of different syntax, but the gist of it is trying to get a variable that says vColor1, vColor2, etc. where 1 is a calculation.
Concat('vColor',1)
'vColor' & '1'
'$(vColor' & '1)'
Has anyone gotten something like this to work? I'm trying to avoid creating a variable for each column and using the variable to evaluate..
Hi there!
I can tell that you would benefit a lot from Rob Wunderlich's session on Advanced Scripting at the Masters Summit for Qlik! He covers these tricky questions on variables with many interesting examples!
In your case, you need to calculate the name of the variable first, and then enclose it in the dollar-sign expansion, to replace the name with the contents. So, you need two nested dollar-sign expansions, like this:
=$($(='vColor'&1))
This will do the trick.
To learn more advanced development techniques, check out the agenda of the Masters Summit for Qlik - coming soon to Orlando and to Dublin!