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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
eclecticfish
Contributor
Contributor

Listbox filter all anti join

Hi im having a problem, im working on a qlikview where i need a listbox filter to flag something as YES or NO, normally I would do this by making a flag in the load script. Which i have also done here however i only have the "yes" part. since the flag is based on a script load where i first use sql to load in the main data and then let qlikview implicit join that table with other tables thorugh a common ID. like this LOAD * where exits(COMMON_ID)

The problem is that this flag is located in table loaded in this way, so the load will look like this 

 

LOAD * 

sql

select * from tableA;



and then 

LOAD * where exits(COMMON_ID)

sql 

select a.*,'YES' Falg from tableB b

 

however how do i make a listbox which select all record which did not exits on tableB and therefore dont have a FLAG ?

Labels (3)
1 Solution

Accepted Solutions
MayilVahanan

HI @eclecticfish 

If you want result in front end, try like below

=Aggr(if(Len(Trim(Flag))=0, 'No', Flag), COMMON_ID)

If back end, try like below sample

Temp:
Load * Inline
[
COMMON_ID
1
2
3
4
];

Left Join
Load *, 'Yes' as Flag Inline
[
COMMON_ID
1
2
];

NoConcatenate
Load COMMON_ID, If(Flag='Yes', Flag, 'No') as Flag Resident Temp;

DROP Table Temp;

 

You can change inline with ursource.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

HI @eclecticfish 

If you want result in front end, try like below

=Aggr(if(Len(Trim(Flag))=0, 'No', Flag), COMMON_ID)

If back end, try like below sample

Temp:
Load * Inline
[
COMMON_ID
1
2
3
4
];

Left Join
Load *, 'Yes' as Flag Inline
[
COMMON_ID
1
2
];

NoConcatenate
Load COMMON_ID, If(Flag='Yes', Flag, 'No') as Flag Resident Temp;

DROP Table Temp;

 

You can change inline with ursource.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
eclecticfish
Contributor
Contributor
Author

Just tried your front end solution and it works flawlessly, thank you!