Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
bouderbc
Contributor

How to make Filters on dates with conditions ? (conditional load)

Hi experts ,

How to make Filters on dates with conditions ? (conditional load)Please see The attached sample ?

Request: i want to make a filter and load data with [Date Extract] -30 days and where Date Extract> Date creation

Table:

LOAD [Date Extract],

     [Date creation],

     [Champ Num],

     [Champ Text],

     [Date Extract]-30 as date_Extract

  

//Date extract //Minus 30 Days dateext.PNG

//Filter where date_Extract>Date creation

FROM

C:\Users\Desktop\Tablemodele.xlsx

1 Solution

Accepted Solutions
vishsaggi
Esteemed Contributor III

Re: How to make Filters on dates with conditions ? (conditional load)

Try like this?

LOAD *

WHERE date_Extract > [Date creation];

LOAD [Date Extract],

     [Date creation],

     [Champ Num],

     [Champ Text],

     [Date Extract]-30 as date_Extract

FROM

C:\Users\Desktop\Tablemodele.xlsx;

2 Replies
vishsaggi
Esteemed Contributor III

Re: How to make Filters on dates with conditions ? (conditional load)

Try like this?

LOAD *

WHERE date_Extract > [Date creation];

LOAD [Date Extract],

     [Date creation],

     [Champ Num],

     [Champ Text],

     [Date Extract]-30 as date_Extract

FROM

C:\Users\Desktop\Tablemodele.xlsx;

Re: How to make Filters on dates with conditions ? (conditional load)

Try to load by this way and crate a field for Date Extract - 30 as Date-Extract

Data:

LOAD [Date Extract],

     [Date creation],

     [Champ Num],

     [Champ Text],

     if([Date Extract] > [Date creation],1,0) as Flag,

     Date([Date Extract]-30) as date_Extract

FROM

Tablemodele.xlsx

(ooxml, embedded labels, table is [Table modele])

Where [Date Extract] > [Date creation];