Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

How to implement SQL NOT IN in set analysis

How to implement SQL NOT IN in set analysis

6 Replies
Anonymous
Not applicable

Hi Agnivesh,

In UI : The E() operator (E for Exclude) would be what you need to use in set analysis to exclude subsets of Data.

=Count({<[Customer Name]=e({<[Call Opened - Date/Time]={'>=$(vBeginTime)<=$(vEndTime)'}>}[Customer Name])>}[Customer ID])

Scenarios to use ‘Not in’ keyword in script:

load

     ....

from

     .....

where not(match("Customer",'Jane','Ann','Fiona'));

(OR)

load

     ....

from

     .....

where Customer not in('Jane','Ann','Fiona');

Qlikview recognizes Match keyword whereas SQL doesn’t.

So use above scenarios as required.

Regards

Neetha

anbu1984
Master III
Master III

Use -= to implement 'Not in' in Set analysis.

Sum({<Country-={'INDIA','US'}>} Sales)

vikasmahajan

-= {'USA','INDIA','JAPAN'} you can use in set analysis

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
agni_gold
Specialist III
Specialist III
Author

Thanks

i am trying to convert my sql query in set analysis

select sum(Cost) from Cost_Table where ID in (Select ID from Person_Table where EMP_ID in (select EMP_ID from Employee_Table where Zone_ID=12))

agni_gold
Specialist III
Specialist III
Author

Thanks

i am trying to convert my sql query in set analysis

select sum(Cost) from Cost_Table where ID in (Select ID from Person_Table where EMP_ID in (select EMP_ID from Employee_Table where Zone_ID=12))

anbu1984
Master III
Master III

=Sum({<Zone_ID={12}>}Cost)