Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
canmarroig
Partner
Partner

Data rolling 6 years from last reload time

Hi, i've a field Date time formatted as 01/04/2018, in script i've to set 6 years previous data load  not from today but from the last data reload that is max(datetime). My calendar should be expressed in as Monthname (04/2018). I'm not able to translate in script, can you help me?

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

try this:

Max:

Load

Max(D_FINE_VAL) as MaxDate

Resident your_table;

Let vMax = FieldValue('MaxDate',1);

Drop Table Max;

your_table:

LOAD

.

Date(Date#(Date,'DD/MM/YYYY'),'MM/YYYY') as Date,

.

.

FROM...

WHERE Date>addyears($(vMax),-6);

View solution in original post

4 Replies
isorinrusu
Partner
Partner

Try something like this:


Let vLastReload = Date(floor(ReloadTime()));


Load *

From X

Where yourDate >= Addmonths('$(vLastReload)',-72);

YoussefBelloum
Champion
Champion

Hi,

try this:

Max:

Load

Max(D_FINE_VAL) as MaxDate

Resident your_table;

Let vMax = FieldValue('MaxDate',1);

Drop Table Max;

your_table:

LOAD

.

Date(Date#(Date,'DD/MM/YYYY'),'MM/YYYY') as Date,

.

.

FROM...

WHERE Date>addyears($(vMax),-6);

canmarroig
Partner
Partner
Author

Tks

YoussefBelloum
Champion
Champion

you're welcome good luck