Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
since I have a complex calculation that I reuse in charts, I would like to put into a variable the results of the calculation, but I would like to define dinamically the set of values of the fields on which to perform the calculation.
It looks like defining a new function: is it possible (perhaps using set Analysis in variable definition)?
Thanks in advance!
You can define a variable as an expression that uses parameter placeholders. See the section "Dollar-Sign Expansion with Parameters" in the Ref Guide.
For example
SET myfunc= $1 + $2;
$(myfunc(3,4)) = 7
See also the attached example from the QV Cookbook.
-Rob
You can define a variable as an expression that uses parameter placeholders. See the section "Dollar-Sign Expansion with Parameters" in the Ref Guide.
For example
SET myfunc= $1 + $2;
$(myfunc(3,4)) = 7
See also the attached example from the QV Cookbook.
-Rob
Thanks a lot Rob!
It's very useful and very clear!
Roberta