Forum Discussion

aramirez2's avatar
aramirez2
Helper I
4 years ago
Solved

Clean duplicate words in a string using CONCATENATEX funciton

Hi.   I have a issue trying to concatenate strings.   My model contains 2 tables: Product and Component. Each product is built up by 2 or more components. Each component contains a label.   For...
  • smpa01's avatar
    smpa01
    4 years ago

    aramirez2  you can use a measure like this

     

    Measure =
    CONCATENATEX (
        VALUES ( Component[LABEL] ),
        Component[LABEL],
        ",",
        Component[LABEL], ASC
    )
    

     

     

     

    If you need a calculated column

    Column =
    CONCATENATEX (
        SUMMARIZE ( RELATEDTABLE ( Component ), Component[LABEL] ),
        CALCULATE ( MAX ( Component[LABEL] ) ),
        ",",
        Component[LABEL]
    )