Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
haymarketpaul
Contributor III

LOAD data from each October up to 5 years ago

QV12 SR3

I need to load data that has a registration date from each October up to 5 years ago but i'm struggling to work out the where clause.

For example...

If i were to load data today (3rd September 2016) it would be from 1st October 2011

but next month being October 2016 it would load data from October 2012 onwards until...

...in October 2017 it would load data from October 2013 and so on from each October each year

Any ideas how best to accomplish this much appreciated

Brand:

LOAD

     [CMS Created Date],

     [Registration Type],

     [Registration Name]

FROM

[$(vQVDPath)QVD\BrandLevel_Data.qvd]

(qvd)

Where

//date filtering would go here ideally based on [CMS Created Date] field

;

1 Solution

Accepted Solutions
MVP
MVP

Re: LOAD data from each October up to 5 years ago

Try something like

...

WHERE

[CMS Created Date] >= Yearstart(Today(1), -4,10);

View solution in original post

2 Replies
MVP
MVP

Re: LOAD data from each October up to 5 years ago

Try something like

...

WHERE

[CMS Created Date] >= Yearstart(Today(1), -4,10);

View solution in original post

haymarketpaul
Contributor III

Re: LOAD data from each October up to 5 years ago

Perfect - Thank You