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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make this If as a Set?


Hi

I´m trying do change this If expression to a set expression but can´t make it to work. Can someone help me?

 

If(A3 = 653, sum(Utfall_Belopp * _Flagga_Drift * _Flagga_TransUtbetald),
if(A3 = 651 and Konto = 7921 or A3 = 651 and Konto = 8597 or A3 = 651 and Konto = 7931, sum(Utfall_Belopp * _Flagga_Drift * _Flagga_TransUtbetald)))

1 Solution

Accepted Solutions
Not applicable
Author

Try with:

Sum({<A3 ={653}>+<A3 ={651}, Konto={7921}>+<A3 ={651}, Konto={8597}>+<A3 ={651}, Konto={7931}>}Utfall_Belopp * _Flagga_Drift * _Flagga_TransUtbetald)

View solution in original post

3 Replies
Not applicable
Author

Try with:

Sum({<A3 ={653}>+<A3 ={651}, Konto={7921}>+<A3 ={651}, Konto={8597}>+<A3 ={651}, Konto={7931}>}Utfall_Belopp * _Flagga_Drift * _Flagga_TransUtbetald)

Not applicable
Author

Thanks! Did't know about the >+< operator. Nice to learn new things!

Not applicable
Author

Yes, the + operator stands for union of both sets of records(rows that belong to any of the unioned sets). There also is:

- for Exclusion

* for Intersection

/ for Symmetric Difference

Take a look: