Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nagarjuna005
Contributor III
Contributor III

how to create dynamic variables in qlikview

Hello Experts,

can anyone explain me on how to create dynamic variables in qlikview with one example.

thanks in advance.

4 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

You can use a link to another variable or use values as a parameters with dollar sign:

var_tricks.png

This is more than dynamical, in my honest opinion 😃

nagarjuna005
Contributor III
Contributor III
Author

thanks for the reply shuklin

i have created a variable like vStartDate = 01/15/2018 and vEndDate = 02/15/2018.

while loading data into qlikview it will only from 01/15/2018 to 02/15/2018

but tomorrow i want data till 10/15/2018 in this case how to create a dynamic variable with out changing dates manually.

i am looikng like this

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

To assign a computed value to a variable, use the LET statement in the script. Examples:

LET vEndDate = today(1);

LET vEndDate = MonthStart(today(1));

-Rob

Zhandos_Shotan
Partner - Creator II
Partner - Creator II

Another way:

// get last date according to your dataset

Let vLastDate = '=Max(YourDateField)';

Example:

Sum( {<YourDateField = { $(vLastDate) }> } Value)

Regards