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: 
Not applicable

'AND' + 'OR' in Set Analysis

Hello,

I have an issue:

I need to provide a sum of 'Cost' where 'Type 1' = 1 and 'Field A' or 'Field B' = 1

Something like :

Sum( Type = 'Type 1' and (Field A = 1 OR Field B = 1) Cost )

If anyone could help with Set analysis syntax to perform this, that would be great!

Thanks

BR.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Written from memory (check syntax and parentheses), but something like:

Sum({< Type = {'Type 1'} > * (< [Field A] = {1} > + < [Field B] = {1}>) } Cost )

Hope that helps.

Miguel

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Hi,

Written from memory (check syntax and parentheses), but something like:

Sum({< Type = {'Type 1'} > * (< [Field A] = {1} > + < [Field B] = {1}>) } Cost )

Hope that helps.

Miguel