Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Utop1984
Contributor III
Contributor III

Problem on expression with "or"

Hello all,

I have a problem on an expression today.

I try to chart data where I want the sum of C when field A or B = 1.

I tried the following :

Sum({$<A={1} or B={1}>}C)

But it always tells me there is an error...

Any idea ?

Labels (3)
2 Solutions

Accepted Solutions
sunny_talwar

Try this

Sum({<A = {1}>+<B = {1}>} C)

View solution in original post

sunny_talwar

Within set analysis

* = AND

+ = OR

View solution in original post

5 Replies
martinpohl
Partner - Master
Partner - Master

Sum({$<A={1}>*<B={1}>}C)

Regards

sunny_talwar

Try this

Sum({<A = {1}>+<B = {1}>} C)
Utop1984
Contributor III
Contributor III
Author

thanks a lot for your help but it seems this expression sends me a result when A AND B are equal to 1.

Nevertheless thanks a lot 🙂

Utop1984
Contributor III
Contributor III
Author

Thanks a lot ! to be honest I didn't really understand the "Logic" but the result seems to be the right one...
As i don't see the "Or" operande I don't know how it can understand that I want results where A OR B = 1 ... This expression to me would have meant A AND B = 1, but it is working, so thanks a lot to you !!!
sunny_talwar

Within set analysis

* = AND

+ = OR