Forum Discussion

Wkeith's avatar
Wkeith
Helper II
6 years ago
Solved

Duplicate Concatenate Question

Hi, I am trying to concatenate products that belong to the same order ID to do some market basket analysis. So for example, lets say for an order number that has these products sold in it: Milk, Brea...
  • MFelix's avatar
    6 years ago

    Hi Wkeith ,

     

    Try to change you formula to something similar to this:

     

    Market Basket =
    CALCULATE(
    CONCATENATEX(DISTINCT(Sales[Product]), Sales[Product], “-“ ),
    FILTER(
    ALL(Sales),
    Sales[Transaction ID] = EARLIER(Sales[Transaction ID])
    )
    )

    Regards,

    MFelix