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: 
Not applicable

I am trying to find out dynamic intersection between three or more selections in a field

I have these two fields Retailer and Products that these retailers sell. When i select, suppose A, B, C i want to see the common items these retailers are selling. suppose if I select A,B,C i want to see Rice on the other field 'Products'. How can i create an expression using intersection? thanks.

7 Replies
ramoncova06
Partner - Specialist III
Partner - Specialist III

can you provide an example for the data set and expected result

swuehl
MVP
MVP

Have you looked into an AND-mode list box?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It depends exactly on how you want to display the products. But given a Dim of Product, a set expression of:

{<Product={"=count(DISTINCT Retailer)=count(DISTINCT TOTAL Retailer)"}>}

would I think make the set. See attached for examples of using that in a listbox and straight table.

-Rob

http://masterssummit.com

http://robwunderlich.com

petter
Partner - Champion III
Partner - Champion III

Interesting solution ... but I had a hard time really understanding it until I visualized it for myself in this somewhat less efficient - but exactly similar logic:

The title of the Straight Table contains the expression of the second column.

2015-06-09 #1.PNG

Where I could see visually the list of retailers for each product and the count and comparing it to the total selected...

Not applicable
Author

Hi Ramon,
I have attached dataset and Expected output in the post. Thanks

Not applicable
Author

Hi Petter,
I just updated the Post with dataset and Expected result. Let me explain you, If i select three or more different retailers, i should be able to see the common items these retailers sell. Thanks

petter
Partner - Champion III
Partner - Champion III

Actually you have a perfectly good solution from Rob - mine was just a comment and I sent it to Rob really ... I didn't mean to create any confusion.