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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with multiple conditions

Hello,

I'm starting to use set analysis for the expressions in charts. I'm having trouble when I need to have multiple conditions to aggregate values.

The original formula (it worked flawlessly but if I selected some data the chart was rebuilt) was:

=Sum(If(Tipo >= 2, If(right(Quarter,1)='1',If(left(Quarter,2)='15',ENR))))/Sum(If(right(Quarter,1)='1',If(left(Quarter,2)='15',ENR)))

The formula with set analysis that I think would be similar would be:

=Sum({1<Tipo={">2"},Quarter={"15*"},Quarter={"*1"}>}ENR)/Sum({1<Quarter={"15*"},Quarter={"*1"}>}ENR)

Do you know what I'm doing wrong with the second one?

Thanks!

12 Replies
Anonymous
Not applicable
Author

that means, you're sure, that there's always a one to one relationship  in the chain between:

- ENR

- Quarter

- Tipo

???

Not applicable
Author

Found the solution a few answers below.

For a specific Quarter and a specific Tipo you have multiple ENR, however the key for the tables is a specific Code

Anonymous
Not applicable
Author

as I said: I don't know your data