Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
baarathi
Creator III
Creator III

<= >= for date stored in variable

First NameLast NameDate of JoiningDesignationLocationSalary
GajaRamalingam1/1/2007Project ManagerChennai10000
JaganMohan1/1/2008Senior DeveloperChennai7000
VishalShete1/1/2012Project ManagerNew York10000
LaxmanReddy2/2/2012Senior DeveloperNew York20000
KarunNair3/3/2012Senior DeveloperChennai30000

Let varLastReloadDate = '1/1/2018';

Let varSal = 7000;

Let varThisReloadDate = '2/2/2018';


LOAD

    "First Name",

    "Last Name",

    "Date of Joining",

    Designation,

    Location,

    Salary

FROM [lib://Temp/Employee.xls]

(biff, embedded labels, table is Sheet1$)

Where "Date of Joining" > $(varLastReloadDate);

Let varLastReloadDate = varThisReloadDate;

As per the logic the above line should not load any line. But the entire 5 rows are loaded in script. In qliksense, does > and < work opposite for date?

3 Replies
Digvijay_Singh

Looks like $(varLastReloadDate) is numerically calculated, try putting apostrophe around.

sunny_talwar

Use single quotes around your variable and see if that works

Let varLastReloadDate = '1/1/2018';

Let varSal = 7000;

Let varThisReloadDate = '2/2/2018';

LOAD

    "First Name",

    "Last Name",

    "Date of Joining",

    Designation,

    Location,

    Salary

FROM [lib://Temp/Employee.xls]

(biff, embedded labels, table is Sheet1$)

Where "Date of Joining" > '$(varLastReloadDate)';

zebhashmi
Specialist
Specialist

Let varLastReloadDate = 1/1/2018;

or

Let varLastReloadDate =Date(1/1/2018, D/M/YY);