Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
gustavofred
Contributor II
Contributor II

Variables with $ and without $

Im trying to understand some code. When do i want to use $ in front of my variables and when not? 

example 1:

let TodaysFirstdate = (num((today()) - (731 + 90)));
LET varMinDate = $(TodaysFirstdate);
LET varMaxDate = num(today()-1);
LET varToday = num(today());
LET maxYear = year($(varMaxDate));
LET minYear = year($(varMinDate));

example 2:

SQL SELECT 
....
WHERE YEAR>= $(minYear) AND YEAR<= $(maxYear);

 

1 Solution

Accepted Solutions
edwin
Master II
Master II

qlikview evaluates anything inside he $() first before evaluating the script expression.  it pretty much replaces the $ expansion with text or numbers, and then proceeds like normal script execution:

Dollar-sign expansion using a variable ‒ QlikView

View solution in original post

1 Reply
edwin
Master II
Master II

qlikview evaluates anything inside he $() first before evaluating the script expression.  it pretty much replaces the $ expansion with text or numbers, and then proceeds like normal script execution:

Dollar-sign expansion using a variable ‒ QlikView