Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
dafnis14
Contributor III

Combining logical operators in set analysis

Hi,

I need to create a set analysis expression which as OR conditions and  AND condition(s).

in general it looks:

(Condition 1 OR Condition 2 OR Condition 3) AND Condition 4 AND Condition 5.

Any ideas how to accomplish this?

Thanks in Advance!

Dafnis

1 Solution

Accepted Solutions
MVP
MVP

Re: Combining logical operators in set analysis

OR -> +

AND -> *


In general,

Sum({<Set1>+<Set2>} Amt)

Sum({<Set1>*<Set2>} Amt)

So for your case, might be like:

Sum({(<Condition 1> + <Condition 2> + <Condition 3>) * <Condition 4> * <Condition 5>} Field)

5 Replies
MVP
MVP

Re: Combining logical operators in set analysis

OR -> +

AND -> *


In general,

Sum({<Set1>+<Set2>} Amt)

Sum({<Set1>*<Set2>} Amt)

So for your case, might be like:

Sum({(<Condition 1> + <Condition 2> + <Condition 3>) * <Condition 4> * <Condition 5>} Field)

dafnis14
Contributor III

Re: Combining logical operators in set analysis

Great! Thanks!

BTW, is it possible to use a variable for the above expression?

MVP
MVP

Re: Combining logical operators in set analysis

Yes.

Not applicable

Re: Combining logical operators in set analysis

Is there a way to have current selection AND bookmark?

Say I have a bookmark called 'BASELINE'

I tried {BASELINE+1} but that does not appear to work.

Nor does {<BASELINE>+<1>}

Any other ideas?

MVP
MVP

Re: Combining logical operators in set analysis

Current selection is referred by '$'. So try like:  {$+Bookmark}