Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody.
I encountered such a problem.
In the loading script, I set the variable:
SET vTEST = sum({<DateKey = {'$(=max(DateKey))'}>} SUM_IN_WITH_NDSmov);
But in after reload variable looks like this:
sum({<DateKey = {''}>} SUM_IN_WITH_NDSmov)
I asking for help.
With best regards,
Anton.
I usually store these kind of variables in an Excel file using something like
http://www.qlikfix.com/2011/09/21/storing-variables-outside-of-qlikview/
which does also fix the dollar sign expansion issue.
Thank you.
I already solved my problem with "excel solution". But now I'm wondering how to correctly declare a variable in the load script.
The two links that I have shared have 2 different techniques listed in them... have you looked at them?
Keep in mind that as long as you do not literally quote the string with dollars in your script, the $() won't get expanded.
You can pass around using variables and/or fields in statements any string with $()'s that should not be expanded. $-expansion will not happen on variable or field content, only on statement syntax inside your script and by the script engine (more precisely by a sort of pre-processor inside the parser) and before the statement is evaluated.
Functions also don't bother with $-sign expansion.
Thank you.
I'm studying your material now.
I solved problem with.
SET _varName = vTEST;
SET _varValue = sum({<DateKey = {'@(=max(DateKey))'}>} SUM_IN_WITH_NDSmov);
LET [$(_varName)] = Replace('$(_varValue)','@','$');
Thank you!