Discussion Board for collaboration on QlikView Scripting.
I have an input box with the variable test. The value of this variable is =Date(Today()-1)
Then, in the script, i want to put this variable in a where clause.
Here is my problem, i tried:
Where Column <> $(test)
but it doesn't work because of the '='.
And the thing is that the '=' char is needed in the expression of the variable or it displays 'Date(Today()-1)'
Anyone have an idea for this?
Go to Solution.
R Click on sheet --> New Sheet Object --> Slider/Calendar Object.....-->
In General Tab choose Calendar (Input Style) and Variable(s)
Hi Loic!What's your requirements? will the variable be set by the user? is the value '=Date(Today()-1)' a default value?Have you tried an If-statement ?
You can try this in your script: where column<> if($test='=Date(Today()-1)'
Yes that's right, i just want '=Date(Today()-1)' to be a default value.
I don't know, how do you think i can do this with an If statement?
Just set the variable in the script before you use it in the where clause:
LET vYesterday = num(today()-1);
Load * from MyTable where MyDate <= $(vYesterday);
No guys, this don't work because the users could put another value in the input box and this will not work anymore
for me Gysbert isolution works
input box (variable test),
let test2 = $(test);
where dat_data >= $(test2);
This is true but the problem with this solution is that the users will see 'Today()-1' instead of '30.01.2014' for today in the input box.
use a calendar based on the variable test and in number tab choose date
How can i use a calendar based on a variable?