Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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 NameSKU NumberPrice
Cust 18150
Cust 25200
Cust 13         10,000
Cust 4650
Cust 31           4,500
SKU NumberSKU NameCategory
1Mobile ChargerMobile Accessories
2Screen GuardMobile Accessories
3Air PodMobile Accessories
4Washing detergentHousehold Items
5Fabric ConditionerHousehold Items
6Napthalene ballsHousehold Items
7Neck PillowTravel
8Luggage TagTravel
  • 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 Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • sturlaws's avatar
    sturlaws
    Icon for Resident Rockstar rankResident 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's avatar
    dax
    Icon for Community Support rankCommunity 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 Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.