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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
maly0606
Contributor II
Contributor II

Count IF and Sen Analysis the same condition diffrent resoults

Hello 

I am trying understand why I have different results for below expressions.
When I mark on the list box in filed Stream = Customer :

this condition show me 0 (that it is correct result) ->

count(IF(Stream='Material' and ListReferenceSign<>'%' and CT_Global<=Material_SLA_Global,ListNumber))

 

But set analysis show me value 149 

count({<Stream={'Material'},ListReferenceSign-={'%'},CT_Global={'<=$(Material_SLA_Global)'}>}ListNumber)

There are the same conditions therefore i don't know why results are different ? 

 

Thanks

Marcin

 

 

1 Reply
sasiparupudi1
Master III
Master III

I think the problem is with the condition 

and CT_Global<=Material_SLA_Global

CT_Global={'<=$(Material_SLA_Global)'} 

if you remove the condition from both expressions, do the counts match? also you need to note that the set analysis is not calculated row by row unlike the if condition

A more Ideal condition would be to use with an aggregation CT_Global={'<=$(Max(Material_SLA_Global))'} 

if you do not use explicit aggregation it resorts to only() which returns null when there are more than one value

 

hth