Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Bilal3
Contributor
Contributor

Filter a table

Dear community,

 

I have a table as in the picture  with a reference, date when we import the dataset, and name (that change everyday)

 

I want to filter this table to keep only the value where In=1 but in the column name take the last value.

 

Could you please assist me ?? 

 

Thanks 

1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

T:
load * Inline[
Ref,Date,In,Out,Name
A1,01/05/2023,1,0,
A1,02/05/2023,0,0,V13
A1,03/05/2023,0,0,V16
A1,04/05/2023,0,0,P98
A1,05/05/2023,0,1,P98
B1,02/05/2023,1,0,
B1,05/05/2023,0,0,V55
B1,04/05/2023,0,0,G87
B1,05/05/2023,0,0,H34

];
NoConcatenate
F:
LOAD Ref,
LastValue(Name) as Name,
Date(Max(Date)) as Date

Resident T
Group By Ref;

Left Join
LOAD Ref,
In,
Out

Resident T
Where In = 1;

DROP Table T;


EXIT SCRIPT;

BrunPierre_0-1683636669835.png

View solution in original post

2 Replies
BrunPierre
Partner - Master
Partner - Master

T:
load * Inline[
Ref,Date,In,Out,Name
A1,01/05/2023,1,0,
A1,02/05/2023,0,0,V13
A1,03/05/2023,0,0,V16
A1,04/05/2023,0,0,P98
A1,05/05/2023,0,1,P98
B1,02/05/2023,1,0,
B1,05/05/2023,0,0,V55
B1,04/05/2023,0,0,G87
B1,05/05/2023,0,0,H34

];
NoConcatenate
F:
LOAD Ref,
LastValue(Name) as Name,
Date(Max(Date)) as Date

Resident T
Group By Ref;

Left Join
LOAD Ref,
In,
Out

Resident T
Where In = 1;

DROP Table T;


EXIT SCRIPT;

BrunPierre_0-1683636669835.png

Bilal3
Contributor
Contributor
Author

Thank you so much