Ok, so I'm making progress. I think I understand this much (there is a follow-up question below):
In the dimension definition: ='$(vTest2)'
- The equal sign tells Qlik that it's an expression to be evaluation, not just text.
- The single quotes tell Qlik to treat what's inside as a literal string, not a field name.
Then for the variable: SET vTest2= =Concat(location, ', ');
- The scope of the equals sign does not carry into variables. Qlik assumes anything within $() is just text.
- To get Qlik to evaluate the expression, we need to add the equal sign within the variable.
How can I make this work without any variable or dollar-sign expansion? I've tried defining my dimension as:
- ='Concat(location, ', ')'
- ='=Concat(location, ', ')'
But neither of those work.
I can do it without the variable by defining the dimension like this: ='$(=Concat(location, ', '))', but why do I need dollar-sign expansion if I have no variable?