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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HxH
Helper II
Helper II

Finding alternative products bought by same customers

Hi everyone, 
I have a sales table in which every row corresponds to a sale. In every row there is the customerID, the Product Category and Product Subcategory. What I want to do is have a visual (or two, if it must be done with two different measures) that shows the Product Categories and Subcategories that are alternative to the selected one. 

To simplify: let's say I have ProductCategory X and Y and Customers A,B and C. Customer A and B have bought product X but customer C hasn't. All 3 of them have bought product Y. What I want to see when I select ProductCategory X in the slicer is the number of sales of product Y ONLY for customer A and B, since they are the ones who have bought the product selected in the slicer at least once. 

I would also like to do the same if I select a subcategory: if I select X1 I would like to see the sales of subcategories X2,X3...,Xn only for those customers who have bought X1 at least once. 

Thanks for any help/advice. 

1 ACCEPTED SOLUTION

I'm sorry but I can't share the data 😕 

However I've found something very useful to solve the problem on Dax Patterns, using the Basket Analysis pattern. 
Here is the link if anyone needs it to solve situations similar to mine: https://www.daxpatterns.com/basket-analysis/

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @HxH ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

I'm sorry but I can't share the data 😕 

However I've found something very useful to solve the problem on Dax Patterns, using the Basket Analysis pattern. 
Here is the link if anyone needs it to solve situations similar to mine: https://www.daxpatterns.com/basket-analysis/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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