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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

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 III
Creator III
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 III
Creator III
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
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Hi Paul,

maybe this post can help Excluding values in Set Analysis

Best

Juraj

paulwalker
Creator III
Creator III
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)