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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Prachi_Pradip_Kulkarni
Contributor II
Contributor II

multiple Or-And conditions in one expression

Hi, 

I am trying to implement following if condition in set analysis:

IF condition: count(distinct if(R1='YES' or R2='YES' or R3 ='YES') and Flag=1),ID)

set analysis: count(distinct {<{R1='YES' + R2='YES' + R3 ='YES'},Flag=1>}ID)

also tried        count(distinct {<R1='YES',Flag=1 + R2='YES',Flag=1 + R3 ='YES',Flag=1}ID)

But it's Not working...

What can I do to solve this with set analysis?

Thank you in advance.

Best regards

 

 

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

@brunobertels i dont think that's correct syntax where you put that flag.

count(distinct {<R1={'YES'}> + <R2={'YES'}> + <R3 ={'YES'}> * <Flag={1}>}ID)

or

count(distinct {<R1={'YES'}, Flag={1}> + <R2={'YES'}, Flag={1}> + <R3 ={'YES'}, Flag={1}> }ID)

View solution in original post

5 Replies
brunobertels
Master
Master

Hi 

 

Try this 

count(distinct {<R1={'YES'}> + <R2={'YES'}> + <R3 ={'YES'}>,Flag={1}>}ID)

stevejoyce
Specialist II
Specialist II

@brunobertels i dont think that's correct syntax where you put that flag.

count(distinct {<R1={'YES'}> + <R2={'YES'}> + <R3 ={'YES'}> * <Flag={1}>}ID)

or

count(distinct {<R1={'YES'}, Flag={1}> + <R2={'YES'}, Flag={1}> + <R3 ={'YES'}, Flag={1}> }ID)

Prachi_Pradip_Kulkarni
Contributor II
Contributor II
Author

Hi brunobertels,

Thanks for reply

Not working for me

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Or maybe in your way

 if(R1='YES' or R2='YES' or R3 ='YES' and Flag=1, Count(ID) )

Prachi_Pradip_Kulkarni
Contributor II
Contributor II
Author

Thank You @stevejoyce ,

It's Working!🙂