Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count AT LEAST 1or more responses

Hi All,

I have to calculate AT LEAST ONE response as Yes in all three V1, V2, V3 fields . I am using following expression. Is there any other short way out to get this? Because I also have to calculate AT LEAST 2 OF 3 etc.

V1={'Yes'}>*<V2={'No'}>*<V3={'No'}>+

<V1={'No'}>*<V2={'Yes'}>*<V3={'No'}>+

<V1={'No'}>*<V2={'No'}>*<V3={'Yes'}>} distinct EmpID)/count(distinct EmpID)

Thanks

3 Replies
Anonymous
Not applicable
Author

you can created flag in the script for each of the condition and then use the flag in your expression instead of whole condition.

Anonymous
Not applicable
Author

flag1.PNGflag.PNG

sunny_talwar

May be this

One Response as Yes

=Count(DISTINCT {

<V1 = {'Yes'}, V2 = {'No'},  V3 = {'No'}>+

<V1 = {'No'},  V2 = {'Yes'}, V3 = {'No'}>+

<V1 = {'No'},  V2 = {'No'},  V3 = {'Yes'}>} EmpID)

Atleast 2 of 3

=Count(DISTINCT {

<V1 = {'Yes'}, V2 = {'Yes'}, V3 = {'No'}>+

<V1 = {'No'},  V2 = {'Yes'}, V3 = {'Yes'}>+

<V1 = {'Yes'}, V2 = {'No'},  V3 = {'Yes'}>+

<V1 = {'Yes'}, V2 = {'Yes'},  V3 = {'Yes'}>} EmpID)