Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
zhichengyang
Regular Visitor

How do I calculate top complementary products customer bought in a single transaction?

I don't know it is accurate enough to describe my need.

I am pretty fresh and still learning to use Power BI. So I greatly appreciate your help and would like to spend time in understanding your reply!

 

Our store sells cheap products so people generally buy 2 or 3 products together.

So I need to know when people buy a certain product, which products they would like to buy most.

The table I currently have:

Table 1: Current All Time Sales, I have columns include [Store Number], [Transaction Code], [Product SKU], [Quantity Sold]

Table 2: Product Information, I have columns include [Product SKU], [Product Name], [Product Category], [Product Subcategory]

Table 3: Store Information, I have columns include [Store Number], [Store Name], [Store Category]

 

Note that each transaction code is unique like transaction code 20170401004000a01 represents a single transaction happened for a customer, he or she might buy 2 or more products in this transaction. So a transaction code could contain 2 or more product SKUs.

 

I built the relationship between 3 tables, I can filter 'Current All Time Sales' by 'Product Information' and 'Store Information'

I need to display two features:

 

1. To show what is the most frequent products people bought together, and rank it in a readable way.

 

2. By selecting a Product SKU, I can see the all the products people bought together when people bought this product.

 

I'll try to attach the image to illustrate better ASAP. And please ask me anything if you need more information.

2 REPLIES 2
OwenAuger
Super User
Super User

@zhichengyang

What you have described falls under the category of "basket analysis".

Have a look here for some patterns that could be adapted to your needs:

https://www.daxpatterns.com/basket-analysis/

 

It would be good to see some sample data & expected outputs (even small tables) to give some concrete suggestions.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn
v-danhe-msft
Employee
Employee

Hi @zhichengyang,

Could you please post me some sample data or share the pbix file if possible and could you post me your desired picture?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.