Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

samvile18
Contributor II

Setting a simple variable

Afternoon everyone,

I'd like to set a variable in my script called vMaxExtractDate...I basically need the value to be the maximum date with the field Extract Date, this is what I have so far and the value is always blank:

SET vMaxExtractDate = Max(Date([Extract Date]))

Can anyone help me please?

1 Solution

Accepted Solutions
vijay_iitkgp
Valued Contributor

Setting a simple variable

Please do like:

Table1:

Load Distinct

Max([Extract Date]) as MaxDate

From/Resident Table;

Let vMaxExtractDate=Date(Peek('MaxDate',0,'Table1'));

Hope this will help

2 Replies
vijay_iitkgp
Valued Contributor

Setting a simple variable

Please do like:

Table1:

Load Distinct

Max([Extract Date]) as MaxDate

From/Resident Table;

Let vMaxExtractDate=Date(Peek('MaxDate',0,'Table1'));

Hope this will help

samvile18
Contributor II

Setting a simple variable

Thanks for the help Vijay, this was my next test and it works brilliantly.

Community Browser