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: 
Anonymous
Not applicable

Deleting rows after doing lookup with fiels

Hi Team,


I need your help in the below mentioned logic(applied in Excel) to be implemented in Qlikview:

  Select Flag=Y in report;

  1. After the selection of Flag=Y, copy corresponding ID  to another sheet. Named this sheet “Flag”;
  2. Clear all filter conditions in report;
  3. Insert one column “vlookup Flag Y” in report. Use “ID ” in report to do v-lookup with “ID ” in sheet Flag;
  4. Filtered out IDs that can be found in column “vlookup flag Y” in report;
  5. Delete these rows;

Below is a snapshot for reference:

ItemIDFlagAmount
A12345678N100If Flag is "Y" for this ID, then Should delete 1st and 2nd row (highlighted in Yellow)
B12345678Y100
C87654321N

100

Thanks and Regards

Abhijit Mishra

 

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Master:

Load * Inline [

Item, ID, Flag, Amount

A, 12345678, N, 100

B, 12345678, Y, 200

C, 87654321, N, 300

D, 87654300, Y, 400

E, 87654321, N, 500

F, 87654322, Y, 500

F, 87654323, N, 600];

Map:

Load Distinct

       ID as Exclude

Resident Master Where Flag='Y' ;

NoConcatenate

Final:

Load

      *

Resident Master Where not Exists(Exclude, ID);

DROP Table Master, Map;

Capture.JPG

View solution in original post

2 Replies
tresesco
MVP
MVP

Try like:

Master:

Load * Inline [

Item, ID, Flag, Amount

A, 12345678, N, 100

B, 12345678, Y, 200

C, 87654321, N, 300

D, 87654300, Y, 400

E, 87654321, N, 500

F, 87654322, Y, 500

F, 87654323, N, 600];

Map:

Load Distinct

       ID as Exclude

Resident Master Where Flag='Y' ;

NoConcatenate

Final:

Load

      *

Resident Master Where not Exists(Exclude, ID);

DROP Table Master, Map;

Capture.JPG

Anonymous
Not applicable
Author

Thanks tresesco

It worked.