Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to use let variable in front end? simple example pls?

how to use let variable in front end? simple example pls?

thanks

3 Replies
Gysbert_Wassenaar

You can define a variable in the script or in the Variable Overview (from the Settings menu) in the front end. Once a variable is defined you can use it in expressions. An example:

Define a variable vToday that will contain the numeric value of todays date:

LET vToday = num(today());

Use the variable vToday in a set analysis expression to sum the sales of the last three months:

sum({<SalesDate={'>$(=addmonths($(vToday),-3))<=$(vToday)'}>} Sales)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

we  can call by setting variable by 'SET' as well but is there any advantage is there using ' LET' exactly here.

regards

Mahesh T

Gysbert_Wassenaar

See this blog post: The Magic of Variables


talk is cheap, supply exceeds demand