Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
bebee727
New Contributor II

Date expressions in Data Load Editor

 

Hello,

I’m working in the Data Load Editor in QLIK Sense.  I want limit my data by reviewing two dates.

Booked_Date and Snapshot_Date.  The Snapshot_Date is always the first day of the Month

The Booked_Date needs to be 3 months prior to the Snapshot_Date.  I’m thinking to subtract the Number of Months between the two dates.  If they equal to 3 get the data. 

 

I can’t figure out the Syntax to do this.  Below are examples of what I’m working with

 

Booked_Date

Snapshot_Date

Capture

04/05/2016

07/01/2016

Yes

04/15/2016

05/01/2016

No

12/15/2015

03/01/2016

Yes

12/15/2015

12/01/2015

No

 

Thank you in advance

 

Bee

 

1 Solution

Accepted Solutions
bebee727
New Contributor II

Re: Date expressions in Data Load Editor

I tried this code and I was getting errors and couldn't load the data.  So I took your concept and tweeked it to this:

MonthName(AddMonths(Snap_Shot_Dt,-3)) = MonthName(Booked_Dt)

And this works perfect.  Thanks for getting me started.  I'm learning a lot.

2 Replies

Re: Date expressions in Data Load Editor

May be like this:

LOAD Booked_Date,

          Snapshot_Date,

FROM Source

Where ((Year(Snapshot_Date) * 12) + Month(Snapshot_Date)) - ((Year(Booked_Date) * 12) + Month(Booked_Date)) = 3;

bebee727
New Contributor II

Re: Date expressions in Data Load Editor

I tried this code and I was getting errors and couldn't load the data.  So I took your concept and tweeked it to this:

MonthName(AddMonths(Snap_Shot_Dt,-3)) = MonthName(Booked_Dt)

And this works perfect.  Thanks for getting me started.  I'm learning a lot.