Forum Discussion

kangu's avatar
kangu
Regular Visitor
4 years ago
Solved

Merger text in tabel

Hello

I have data tabel in Power BI

 

I need to merger (sum) text to have this:

I can do it to number, but I can't to text. Please help

I need this in tabel visualisation on PowerBI desktop

  • With DAX:

    As a calculated Column (my Table is called 'FTable')

    VALUE =
    CONCATENATEX (
        FILTER (
            ALL ( FTable ),
            FTable[ID] = EARLIER ( FTable[ID] )
                && FTable[Type] = EARLIER ( FTable[Type] )
        ),
        FTable[Orig Value],
        ", "
    )
    

     

    As a measure:

    VALUE1 =
    VAR _id =
        MAX ( FTable[ID] )
    VAR _type =
        MAX ( FTable[Type] )
    RETURN
        CONCATENATEX (
            FILTER ( ALL ( FTable ), FTable[ID] = _id && FTable[Type] = _type ),
            FTable[Orig Value],
            ", "
        )
    

     

    I've attached the sample PBIX file

     

7 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    With DAX:

    As a calculated Column (my Table is called 'FTable')

    VALUE =
    CONCATENATEX (
        FILTER (
            ALL ( FTable ),
            FTable[ID] = EARLIER ( FTable[ID] )
                && FTable[Type] = EARLIER ( FTable[Type] )
        ),
        FTable[Orig Value],
        ", "
    )
    

     

    As a measure:

    VALUE1 =
    VAR _id =
        MAX ( FTable[ID] )
    VAR _type =
        MAX ( FTable[Type] )
    RETURN
        CONCATENATEX (
            FILTER ( ALL ( FTable ), FTable[ID] = _id && FTable[Type] = _type ),
            FTable[Orig Value],
            ", "
        )
    

     

    I've attached the sample PBIX file

     

    • kangu's avatar
      kangu
      Regular Visitor

      Thanks, it's working ! 🙂

  • Hi,

    I think this should be easy when you do it in power query. 
    First pivot and then concat the column should solve this.

     

    Regards

  • kangu's avatar
    kangu
    Regular Visitor

    Thanks for Your reply.

    I try it but not working or I do some wrong.

    Can You give more inforation how I can do it?

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi kangu 

    Create a new measure 

    CONCATENATEX ( 

    TableName,

    TableName[VALUE],

    ", ", 

    )