Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
avner_raz
Contributor III
Contributor III

Flag Max Date

Hi All,

I have a table with items and dates it looks like that:

Item no.Date (dd.MM.yyyy)
111101.01.2014
111103.05.2014
111102.07.2014
222204.02.2013
222209.05.2014
222201.07.2014

I wish to add a flag to indicate the max date for each item

appreciate any help

thanks

avner

1 Solution

Accepted Solutions
parthiband
Partner
Partner

The script  which Alexandros17 posted is right.

But for your better understanding, it will be much better if u use the below

AAA:

LOAD Item,

          myDate,

          Item&Num(Date) as Key

FROM myTable;

left join (AAA)

LOAD Item&Num(MaxDate) as Key, 1 as Flag;

Load Item,

        Max(myDate) as MaxDate

resident AAA

group by Item;

Drop Field Key;

Thanks,

View solution in original post

4 Replies
alexandros17

Where in the script or in a chart?

In the script do:

AAA:

Select Item, myDate from myTable;

left join

Load Item, Max(myDate) as myFlag resident AAA group by Item;

Let me know

parthiband
Partner
Partner

The script  which Alexandros17 posted is right.

But for your better understanding, it will be much better if u use the below

AAA:

LOAD Item,

          myDate,

          Item&Num(Date) as Key

FROM myTable;

left join (AAA)

LOAD Item&Num(MaxDate) as Key, 1 as Flag;

Load Item,

        Max(myDate) as MaxDate

resident AAA

group by Item;

Drop Field Key;

Thanks,

View solution in original post

VishalWaghole
Specialist II
Specialist II

Hi Anver,

PFA Hope it will help you.

-- Regards,

Vishal Waghole

avner_raz
Contributor III
Contributor III
Author

Thanks

it really helped me