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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
exg13563
Contributor II
Contributor II

Top 5 Products - Cross Sell

Hey everyone! I have a need for cross sell assistance. I have a list of orders that date back to January 1, 2016. What I am looking to do is see which is the top product sold with a product when selected as a filter. Example is below:

Order #Product
1A
1B
2A
2C
3A
3B
4A
4B

 

So as you can see, product A is sold 3 times with product B and only once with product C. So if I selected from my filtered products "A" I want to have a result that shows me B is the product ordered most with it and it has been ordered with it 3 times.

Can anyone please provide me with the best way to create this expression as I am completely lost. Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this?

Count({<[Order #] =p({<Product = {"B"}>})>} [Order #])

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

View solution in original post

2 Replies
Anil_Babu_Samineni

Perhaps this?

Count({<[Order #] =p({<Product = {"B"}>})>} [Order #])

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
exg13563
Contributor II
Contributor II
Author

This works great! One last question before I make it solved though. Say i wanted to add 2 products like A and B, what would the expression be then?