Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

What is difference when we add the variable in script and variable overview

Hello Everyone,

Can anyone help me in understanding the functionality of variable when we declare the in script and in variable overview.

Thank you

Regards

Ferha

12 Replies
ferha_jafri
Partner - Creator III
Partner - Creator III
Author

It is giving null for the variable but expression is fine and giving values.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The LET statement has missing quotes (I just copied Jonathan's example) and can be easily fixed. How about this one (corrected for using $(Var1), not =$(Var1) in your pivot table expression)?

LET Var1='=Sum({<Date={">$' & '(=Date(Max(Date)-7, ''DD/MM/YYYY''))<=$' & '(=Date(Max(Date), ''DD/MM/YYYY''))"}, Week=p(Week)>} Data)';

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Thank you Jonathan and Peter for your help it worked now but I want to know one more thing that if we provide the number format of 2 decimal places as

LET Var1='=Num(Sum({<Date={">$' & '(=Date(Max(Date)-7,''DD/MM/YYYY''))<=$' & '(=Date(Max(Date), ''DD/MM/YYYY''))"}, Week=p(Week)>} Data),'#,##0.00'';

then it is not converting to 2 decimal places.