Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to create one expression in script using Let or Set variable but not getting expected output.
i a have a master calendar Year field
Set vSales = 'Sum({<Year={"$(=Max(Year))"}>}SalesAmount)';
Above expression not working, applied in table expression like : $(vSales)
Set vSales = 'Sum({<Year={1998}>}SalesAmount)'; // This is working
not able figured it out , please suggest me.
Thanks
Arjun
One way could be using LET, like:
Let vSales = 'Sum({<Year={'&'"$'&'(=Max(Year))"}>}SalesAmount)';
One way could be using LET, like:
Let vSales = 'Sum({<Year={'&'"$'&'(=Max(Year))"}>}SalesAmount)';
Thank u Tresesco its working now.😊
but why we using like { '&'"$'&'(=Max(Year))"}
cant we use like this {"$(=Max(Year))"} //its not giving any value either.
Can you please let me know.
Thanks,
Arjun
Short answer, '$' gets evaluated in the script as well. Therefore, you have to suggest qlik engine that '$' for this case is not for expansion but treat it as a string/char.
Thank u for clarification @tresesco .