Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to store multiple variable values into a QVD, so that they can be used further.
I already searched in the community (https://community.qlik.com/docs/DOC-7168) and found that, we can store variable definition, but not the resultant value of the expression.
Eg: var vSales='Sum(sales)';
Now I want to store into qvd the value of Sum(Sales), which is a number.
Please provide any solution, if this is possible.
Could you explain with an example? Do you need to calculate the sum() or so in the script?
you want to store the variable definition or want to store the value got after the expression evaluation ??
I want to store the value for the expression evaluated
if you use the LET statement to assign the variable it evaluates the result of the expression before assigning it so:
example (value of sales = 1000:
SET vSALES = 'Sum(sales)';
vSALES value would be 'Sum(sales)'
but
LET vSALES = 'Sum(sales)';
vSALES value would be 1000
Not sure if this answers your question?
If you are trying to use these variables in the load, you probably can use Evaluate() or simply dollar-expansion. But these depend on how exactly you need the variables output to be. If you can share a sample qvw explaining your expected output, people here would be helped to help you.
I am not able to share the QVW because of confidentiality.
But, my expression is like 'if(sum([Fiscal Year]={'2015'}Sales)>10,"Yes","No")'
Now I want to store the value as Yes or No in the QVD, instead of the expression itself.
Thanks