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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RSvebeck
Specialist
Specialist

Set analysis replacing IF (with AND OR (AND .. OR ..) etc)

Hello all

I'm building a dashboard and need to convert some tricky IF conditions into SET Analysis.

List all green items (see attached picture for example):

IF  (F2=A AND (F1=N OR F1=M)) OR
(F2=B) OR
(F2=C) OR
(F2=D AND F1=P)

then ...


I've attached a picture where my example data is visualized in a simple way (green and white items).

Regards, Robert

Svebeck Consulting AB
2 Replies
erichshiino
Partner - Master
Partner - Master

Hi, Robert

I don't know you other fields, but let us say that you are trying to sum VALUE

You can use set analysis to operate with different sets

you expression could be:

sum ( { <F2={A}, F1={N,M}>+<F2={B}>+<F2={C}>+<F2={D}, F1={P}>}  value)

Hope this helps,

Erich

Clever_Anjos
Employee
Employee

Maybe you should avoid so complicated expressions in Set Aanalysis.

I would create a field in script time e use this flag as a Set Analysis expression filter