Forum Discussion

Fali324's avatar
Fali324
Icon for Helper II rankHelper II
2 years ago
Solved

Concanate two columns based on a 3rd column

Hi,

 

My data set is below:

Project NameTypeEnabling 
Project 1Main Demo
Project 1Main Piling
Project 1Main Soft Strip
Project 1Trade Demo
Project 1Trade Piling
Project 1Trade Soft Strip



I would like a measure which would give me the output below:

Project NameTypeEnabling 
Project 1Main, TradeDemo, Piling, Soft Strip


Any help will be much appreciated.

 

Thank you.

  • Hi Fali324 ,

     

    How about this?

     

    Here the DAX for the two measures:

    Measure1 = 
    VAR _helptable =
    SUMMARIZE (
        'Table',
        'Table'[Project Name],
        'Table'[Type]
    )
    RETURN
    CONCATENATEX(_helptable, [Type], ",")
    Measure2 = 
    VAR _helptable =
    SUMMARIZE (
        'Table',
        'Table'[Project Name],
        'Table'[Enabling]
    )
    RETURN
    CONCATENATEX(_helptable, [Enabling], ",")

     

    Let me know if this solves your issue 🙂

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/

1 Reply

  • tackytechtom's avatar
    tackytechtom
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi Fali324 ,

     

    How about this?

     

    Here the DAX for the two measures:

    Measure1 = 
    VAR _helptable =
    SUMMARIZE (
        'Table',
        'Table'[Project Name],
        'Table'[Type]
    )
    RETURN
    CONCATENATEX(_helptable, [Type], ",")
    Measure2 = 
    VAR _helptable =
    SUMMARIZE (
        'Table',
        'Table'[Project Name],
        'Table'[Enabling]
    )
    RETURN
    CONCATENATEX(_helptable, [Enabling], ",")

     

    Let me know if this solves your issue 🙂

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/