Discussion Board for collaboration related to QlikView App Development.
Can somebody explain to me (or point me to a blog post), in simple terms, what the dollar sign expansion is? and how it can be used?. Ideally use a couple of practical examples as when I read the help or Designer II, it looses me with in the first sentence.
I really don't know how to explain any better than the first sentences of the Help, which says:
Dollar-sign expansions are definitions of text replacements used in the script or in expressions. This process is known as expansion - even if the new text is shorter. The replacement is made just before the script statement or the expression is evaluated. Technically it is a macro expansion.
A macro expansion always begins with '$(' and ends with ') ' and the content between brackets defines how the text replacement will be done. To avoid confusion with script macros we will henceforth refer to macro expansions as dollar-sign expansions.
You are probably not familiar with Macros? If you could tell me what exactely is hard to understand, I could try explaining that particular part.
I also find the examples in the Help quite understandable, so I am unsure how to simplify those examples.
Sorry for not being any big help,
The dollar sign expression itself is a definition, it tells QV what to do. QV should replace the dollar sign expansion, i.e. the part starting with $( and ending with ) with a text, and this before the actual evaluation of the "meaning" of the text in an expression takes place.
will replace $(vVariable) with the content of the variable. Lets say we have defined the variable in variable overview like
, then this text will replace the dollar sign expansion:
Then this will be evaluated, if used in an expression.
Thanks, in the second line of code in that link it says -// In this example, the chart expression is calculated dynamically, based on the value of the variable SET var2 = ‘sum(Sales)’; Chart Expression: $(var2) Where do I set all these things ? Inside bar chart or elsewhere ?Okay, I figured it out -In variables overview, var2 = sum(SalesAmount)Then, use var2 in chart as =($var2)which brings me to my next question - Qlikview simple variable gives unexpected results in bar chart