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: 
ariaseze
Partner - Contributor III
Partner - Contributor III

Comparison of the products bought together.

Hi experts!, I tell you what I'm trying to achieve with Qlik Sense without getting the expected results.
 
The issue is like this, suppose we have a Fact like the image on the left and a product dimension like the one on the right, what I need to get is to be able to make a graph where filtering a product, I report the other products that were purchased together.

For example, if I filtered by Water (ProdCode: 1) the graph should show me the quantities sold of the other products that were bought with that product (ProdCodes: 2,3,4).


In conclusion, the ProdCode4 is the one that is most purchased together with the ProdCode1.

It would be the typical example of BI where it is concluded that when you buy diapers you usually buy beer, but I can't get it with Qlik.

sketch.png

 

I try to made a duplicate Dimension of Product but I can't achieve.

Any idea of how I can try to achieve this is welcome and I thank you in advance.

Labels (1)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

You will need to use set analysis.

i created a basic app based on data shown in your picture.

expression used is Sum({<Invoice=p(Invoice),Desc=e(Desc)>}Count)

check attached picture hopefully this is close to what you need. check link for more details on p() and e()

https://community.qlik.com/t5/QlikView-App-Development/P-E-and-where-do-you-use-them/td-p/457847

Capture.jpg

View solution in original post

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

You will need to use set analysis.

i created a basic app based on data shown in your picture.

expression used is Sum({<Invoice=p(Invoice),Desc=e(Desc)>}Count)

check attached picture hopefully this is close to what you need. check link for more details on p() and e()

https://community.qlik.com/t5/QlikView-App-Development/P-E-and-where-do-you-use-them/td-p/457847

Capture.jpg

ariaseze
Partner - Contributor III
Partner - Contributor III
Author

Dilipranjith!,
That's exactly what I was looking for, now I remember reading about the e() and p() functions, but since I hadn't used them, I forgot they existed!

You save my day! Thank you for the quick response and for taking the time to share it.
dplr-rn
Partner - Master III
Partner - Master III

No problem. glad it helped