I Have Multiple QVDs with similar names like SALES_1,SALES_2, SALES_3, SALES_4, SALES_5, SALES_6.....
I have to load only those QVDs that have a specific date range in between 20200101 and 20200520.
I tried below, but not working.
Let Vstart=Num(20200101 );
where Num(Date) between $(Vstart) and $(Vend);
Between is not a Qlik function you could use < and > instead.
WHERE Date >= $(Vstart) AND Date <= $(Vend)
You do also need to make sure that you are comparing the correct values. If your Date field is a date then you will probably need to do something like @sunny_talwar is suggesting above.
For reference, remember that
If today() = '20200922' then num(Today()) = 44096. This because 20200922 is only the text representation of the date not the numeric value of the date.
@viveksingh If your actual field value in data also holds the values like YYYYMMDD format then try below
then try below where
where floor(date#(Date,'YYYYMMDD')) >= $(Vstart) and floor(date#(Date,'YYYYMMDD')) <=$(Vend);