Forum Discussion
Cross-sell model
Hi, am trying to replicate a cross sell model in Power BI. For the sake of simplicity, lets assume there are two tables: Customer and SKU Master. The starting point is always the customer. So If i search Cust 1 and select "Mobile Accessories" in the slicer, it should show me SKUs 1 & 2 as cross-sell SKUs. PBIX uploaded here:
how can I do that?
| Customer Name | SKU Number | Price |
| Cust 1 | 8 | 150 |
| Cust 2 | 5 | 200 |
| Cust 1 | 3 | 10,000 |
| Cust 4 | 6 | 50 |
| Cust 3 | 1 | 4,500 |
| SKU Number | SKU Name | Category |
| 1 | Mobile Charger | Mobile Accessories |
| 2 | Screen Guard | Mobile Accessories |
| 3 | Air Pod | Mobile Accessories |
| 4 | Washing detergent | Household Items |
| 5 | Fabric Conditioner | Household Items |
| 6 | Napthalene balls | Household Items |
| 7 | Neck Pillow | Travel |
| 8 | Luggage Tag | Travel |
Hi data_banshee,
You could refer to my sample to see whether it work or not. You could replace Search with Slicer and use below measeure
Measure 2 = VAR aa = IF ( ISFILTERED ( Customer[Customer Name] ), SELECTEDVALUE ( Customer[SKU Number] ), BLANK () ) RETURN IF ( aa IN VALUES ( SKU_Master[SKU Number] ), 1, 0 )Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- sturlaws
Resident Rockstar
Hi Anonymous
are you familiar with daxpatterns.com?
They have pattern called Basket Analysis which I think you can use.
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too. - dax
Community Support
Hi data_banshee,
You could refer to my sample to see whether it work or not. You could replace Search with Slicer and use below measeure
Measure 2 = VAR aa = IF ( ISFILTERED ( Customer[Customer Name] ), SELECTEDVALUE ( Customer[SKU Number] ), BLANK () ) RETURN IF ( aa IN VALUES ( SKU_Master[SKU Number] ), 1, 0 )Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.