Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using variable in Where statement in load script...

The following error occurred:

Unknown Error

The error occurred here:

LOAD

    [Interview Finish Date]

FROM [lib://Apps/All Surveys for 16MY CQI Qlik Sense.xlsx]

Where [Interview Finish Date]<=42501

(ooxml, embedded labels, table is GridExport)

Data has not been loaded. Please correct the error and try loading again.

I can't seem to get this to work:

Where [Interview Finish Date]<=$(MaxIFDate)

It gives me this in the error note:

Where [Interview Finish Date]<=42501


For whatever reason, the script is failing and I believe it to be related to the format of the [Interview Finish Date] column, as it is saved in a General format in the xlsx file. Can someone help me figure out the breakdown in syntax/format?

Thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

I think you where clause is not at the right spot, try this by putting it below the (ooxml ....) part:


LOAD [Interview Finish Date]

FROM

[lib://Apps/All Surveys for 16MY CQI Qlik Sense.xlsx]

(ooxml, embedded labels, table is GridExport)

Where [Interview Finish Date] <= $(MaxIFDate);

View solution in original post

2 Replies
sunny_talwar

I think you where clause is not at the right spot, try this by putting it below the (ooxml ....) part:


LOAD [Interview Finish Date]

FROM

[lib://Apps/All Surveys for 16MY CQI Qlik Sense.xlsx]

(ooxml, embedded labels, table is GridExport)

Where [Interview Finish Date] <= $(MaxIFDate);

Anonymous
Not applicable
Author

I believe that fixed it! Thanks for helping!