Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

concatenate all values for specific value over multiple rows

dear all,   I like to find combinations in sales where i want to find all categories that someone bought on a day for every row in the sales table. i have a table like this: Customer Date Vi...
  • Anonymous's avatar
    Anonymous
    4 years ago

    HI Anonymous,

    You can try to use the following calculated column formula to directly lookup and concatenate dimension table values based on the current category.

    Result=
    VAR list =
        CALCULATETABLE (
            VALUES ( Table[Category] ),
            FILTER ( Table, [Customer] = EARLIER ( Table[Customer] ) )
        )
    RETURN
        CONCATENATEX ( FILTER ( dimension, [Category] IN list ), [categoryname], "," )

    Regards,

    Xiaoxin Sheng