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

Indirect Set Analysis: How to filter a column based on another?

I have two tables in my application that are not connect, they are isolated. However, they share a column with the same data: Location.

I have two charts: one to show the data from table A and the other to show the data from table B.

What I need is: if I select some values in A.Location, I want chart B to filter B.Location based on what was selected in A.Location.

I tried the below but it did not work.

Sum({$<B.Location = P({$} A.Location) >} B.Amount)

Ideas?

1 Solution

Accepted Solutions
Not applicable
Author

Or even if they're linked, make sure you clear selections first.

Try this. I loooks redundant but It has a difference.

Sum({$<B.Location=, B.Location = P({$} A.Location) >} B.Amount)

View solution in original post

4 Replies
Not applicable
Author

Your syntax is correct. Make sure tables A and B are really not linked.

Not applicable
Author

Or even if they're linked, make sure you clear selections first.

Try this. I loooks redundant but It has a difference.

Sum({$<B.Location=, B.Location = P({$} A.Location) >} B.Amount)

Not applicable
Author

That worked. Thanks.

Not applicable
Author

I have a similar problem like yours. but the suggested method doesnt seem to work.

there is an additional condition for me that , one of the fields of A is linked to another table C, and its field value is also taken into consideration.

it is something like this.

B.location = A.location where  c.country = 'US'

a and c are linked tables.

so for this i just added...

Sum({$<B.Location=, B.Location = P({$ <C.Country = {US}>} A.Location) >} B.Amount)

but it doesnt seem to work,

could you let me know what is that ,i am not doing correct.