Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikuser09
Creator II
Creator II

set analysis with two conditions one excluding and one including

I want to ignore the  purchase flag and include the present flag

 

Count({$-1<[Purchase FLAG]={'Y'}, Present Flag>}DISTINCT ID), 

is not working 

Labels (1)
3 Replies
lblumenfeld
Partner Ambassador
Partner Ambassador

Your criteria looks reversed based upon what you're asking.

Are you trying to
   - Ignore any selections made on Purchase Flag, and
   - Require Present Flag to be a specific value?

If so then I'd use

Count({< [Present Flag]={"Y"}, Purchase Flag >}DISTINCT ID)

(Change the Y inside the double quotes to whatever value you're looking for.)

Qlikuser09
Creator II
Creator II
Author

if  i have to ignore specific value purchase flag???

lblumenfeld
Partner Ambassador
Partner Ambassador

You mean Purchase Flag <> Y?

That would be this.

Count({< [Purchase Flag]-={"Y"} >}DISTINCT ID)

Note the “-“ in front of the equal. This means the selected values for Purchase Flag except for “Y”.

There are some other ways to do this when you want selections ignored, etc. @hic does a really good job of explaining it here. https://community.qlik.com/t5/Design/Excluding-values-in-Set-Analysis/ba-p/1471704