Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lalitkgehlot89
Partner - Creator II
Partner - 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