Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator II
Creator II

Set Analysis -- Need Help

Hi Community,

I have expression..

Count({<Type = {'A'},Indicator= {'India'}>}  if(Audit <> 'Competency' and  isnull(EmpName) ,SalesID))

I have converted into Set Analysis..

Count({<Type = {'A'},Indicator= {'India'}, Audit-={'Competency'},  EmpName-={'*'}>} SalesID)


But, this is not working properly.... did i anything wrong ??

Please help me!!

Thanks in Advancee

8 Replies
sunny_talwar

I think problem is with set analysis on EmpName.... you can't really select on null fields... try this instead

Count({<Type = {'A'},Indicator= {'India'}, Audit-={'Competency'}, SalesID = {"=Len(Trim(EmpName)) = 0"}>} SalesID)

paulwalker
Creator II
Creator II
Author

Hi Sunny,

Not working, i'm getting two different values.

if i use IF condition working fine, converting to SET not coming correct.

sunny_talwar

Is SalesID and EmpName coming from two different tables?

paulwalker
Creator II
Creator II
Author

Yes Sunny.. i.e also concatenated both tables

sunny_talwar

Oh so within QlikView they reside in the same table? And did you concatenate or did you join?

juraj_misina
Luminary Alumni
Luminary Alumni

Hi Paul,

maybe this post can help Excluding values in Set Analysis

Best

Juraj

paulwalker
Creator II
Creator II
Author

Sorry, it was my bad, both are coming in same table.

but both expression giving different output.

sunny_talwar

May be create a flag in the script

If(Len(Trim(EmpName)) = 0, 1, 0) as Null_EmpName_Flag


and then this

Count({<Type = {'A'},Indicator= {'India'}, Audit-={'Competency'}, Null_EmpName_Flag = {'1'}>} SalesID)