Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
kulwantsaj219
Contributor II

Re: Count AT LEAST 1or more responses

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

kulwantsaj219
Contributor II

Re: Count AT LEAST 1or more responses

flag1.PNGflag.PNG

Re: Count AT LEAST 1or more responses

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)

Community Browser