Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
brucemeyers
Contributor II
Contributor II

Load if date greater than 7/8

If the Date is greater than 7/8/2018 then I want to load it.  If you look at the syntax you'll probably realize the If statement is the problem, can you help?  

LOAD

    "Date",

    Country,

    "Goals Scored"

FROM [lib://WorldCup/GoalsScored.xlsx]

(ooxml, embedded labels, table is Sheet1)

IF ([Date]>’7/8/2018’,),where Match);


Here is my error


The following error occurred:

Unexpected token: 'IF', expected one of: 'Where', 'While', 'Group'

The error occurred here:

LOAD "Date", Country, "Goals Scored" FROM [lib://WorldCup/GoalsScored.xlsx] (ooxml, embedded labels, table is Sheet1) >>>>>>IF<<<<<< ([Date]>’7/8/2018’,),where Match)

Here is my data. 


Date

Country

Goals Scored

7/15/2018

France

4

7/15/2018

Croatia

2

7/14/2018

Belgium

2

7/14/2018

England

0

7/11/2018

England

1

7/11/2018

Croatia

2

7/10/2018

France

1

7/10/2018

Belgium

0

7/7/2018

Sweden

0

7/7/2018

England

2

7/7/2018

Russia

5

7/7/2018

Croatia

6

7/6/2018

Uruguay

0

7/6/2018

France

2

7/6/2018

Brazil

1

7/6/2018

Belgium

2

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

LOAD

    "Date",

    Country,

    "Goals Scored"

FROM [lib://WorldCup/GoalsScored.xlsx]  (ooxml, embedded labels, table is Sheet1)

WHERE

     [Date] > MakeDate(2018,7,8) ;

View solution in original post

1 Reply
petter
Partner - Champion III
Partner - Champion III

LOAD

    "Date",

    Country,

    "Goals Scored"

FROM [lib://WorldCup/GoalsScored.xlsx]  (ooxml, embedded labels, table is Sheet1)

WHERE

     [Date] > MakeDate(2018,7,8) ;