Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

bouderbc
Not applicable

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
Not applicable

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
Not applicable

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;

its_anandrjs
Not applicable

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];