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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rm1
Contributor III
Contributor III

Connect two filters through set analysis

Hi everyone,

I'd need to know if there is the possibility to connect 2 filters through set analysis. Consider the following 2 filters

Filter 1 --> field 1, field 2, field 3

Filter 2 --> field 4, field 5, field 6

What I need to know is

1) how to write: if Filter 1 - field 1, is selected then select Filter 2 - Field 2, OR if Filter 1 - field 2 is selected then select Filter 2 - field 4, etc etc

2) how to insert the code above it into a set analysis expression as:  sum (${.....} sales)

Thanks in advance for any hint!

Labels (2)
1 Solution

Accepted Solutions
rm1
Contributor III
Contributor III
Author

Thanks for the hint.

I get the results using if and GetSelectedCount nested:

If((GetSelectedCount(field 1)>0), sum(${<Filter2 ={field 4}>}sales),

If((GetSelectedCount(field 2)>0), sum(${<Filter2 ={field 5}>}sales)... and so on...

View solution in original post

2 Replies
Anil_Babu_Samineni
MVP
MVP

May be think from P() and E() like, Below condition works when you have relation between tables

Sum({<Field1=P(Field4)>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rm1
Contributor III
Contributor III
Author

Thanks for the hint.

I get the results using if and GetSelectedCount nested:

If((GetSelectedCount(field 1)>0), sum(${<Filter2 ={field 4}>}sales),

If((GetSelectedCount(field 2)>0), sum(${<Filter2 ={field 5}>}sales)... and so on...