Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
lalitkgehlot89
Creator II
Creator II

Need logic help..

Hi,

In attached data i want only those rows in which status is working or if status is resigned then only latest validto  date record should be shown.

Please help me out asap..

Regards,

Lalit

1 Reply
marcus_sommer

Try the following by ensuring that the date-fields will be interpreted as dates which is depending on your default-settings within the variable DateFormat (at the beginning of your script). If not you need to load the fields as dates, like:

date(date#(VALIDTO, 'DD/MM/YYYY')) as VALIDTO

table:

load VALIDFROM, VALIDTO, WORKER, PERSONNELNUMBER, Status

From YourCSV

where match(Status, 'Working', 'Resigned');

inner join (table)

load date(max(VALIDTO)) as VALIDTO, WORKER, PERSONNELNUMBER

resident table

group by WORKER, PERSONNELNUMBER;

- Marcus