Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bebee727
Contributor II
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
Contributor II
Contributor II
Author

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.

View solution in original post

2 Replies
sunny_talwar

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
Contributor II
Contributor II
Author

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.