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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis statement with ORs and ANDs

Hi Everyone,

I need to write the following as a Set Statement:

(RECORD_TYPE = 'BUYER' AND DATE = 'XX')

AND

(VAR1 = 'XX' OR VAR2='YY')

So in English, I want to create a set where you are a BUYER on a specific DATE and are either XX in variable 1 or YY on variable 2.

I think this should be simple however I can't get the correct syntax as the documentation is not very clear.

Thanks

Gareth

2 Replies
Anonymous
Not applicable
Author

the first is not that difficult . . .but the second part I don't know . . . interesting . . .

e.g.

sum ( {< RECORD_TYPE = {'BUYER'}, DATE ={'XX'}>} if(VAR1 = 'XX' or VAR2 = 'YY', VALUE))



erichshiino
Partner - Master
Partner - Master

I agree.

Maybe, depending on the case, you would have to evaluate the variable:

sum ( {< RECORD_TYPE = {'BUYER'}, DATE ={'XX'}>} if($(VAR1) = 'XX' or $(VAR2) = 'YY', VALUE))