Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set-Analysis comparing selections

I want to count how many customers who has bought each product. And this is not a problem for me. But when I want to count how many customers who has bought a combination of products then I have a problem. Is ther any possible solution.

If I would like to know how many customers who has a combination of product 02 and 04

Is it possible to have a presentation like this.

Product  Numbers of customer

02 not 04   1

02 and 04  2 

04 not 02   1

Load * inline

[CustomerID, ProductID

1,03

1,02

2,04

3,05

3,03

4,03

5,02

5,04

6,04

6,06

6,02 ];

7 Replies
swuehl
MVP
MVP

I think you can re-use the crosstabulation solution I posted here for that, using the same dimension ProductID twice:

http://community.qlik.com/message/162179

Hope this helps,

Stefan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please check attached file for solution.

Hope it helps you.

Regards,

Jagan.

Not applicable
Author

Thank you. It´s very userful when comparing two dimension. But I also want to have a third dimension. Like a venndiagram. Following combination.

Product Numbers of customers.

01 and 02 and 03

01 and 02

01 not 02 not 03

02 and 03

02 not 03 not 01

03 not 01 not 02

jagan
Luminary Alumni
Luminary Alumni

Hi,

check attached file for solution.

Regards,

jagan.

Not applicable
Author

Thank you. What if I want to have a posibility to dynamic change ProductID. Is it possible to use som kind of variable?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Create variable vFieldName = ProductID

=Sum(Aggr(If(Count({<ProductID={'01', '02'}>} DISTINCT $(vFieldName)) = 2, 1, 0), CustomerID))

Hope it helps you.

Regards,

Jagan.

swuehl
MVP
MVP

Have you seen the tab "Sales Overlap" in the "What's new in QV11" demo? Maybe this could give you some ideas, too.