Forum Discussion

vermaaman's avatar
vermaaman
New Member
5 years ago
Solved

Move multiple values from column which has multiple rows in a different column

Hello,    I just started Power BI yesterday, i am new.   I want to move the data from one column which has distinct values in rows but the other column has same values in rows as shown in the pit...
  • AlB's avatar
    5 years ago

    Hi vermaaman,

    This can also be done in Power Query. If you want it in DAX, create a new table as follows, where Table1 is the first table you show on the left:

     

    NewTable =
    ADDCOLUMNS (
        DISTINCT ( Table1[Col1] ),
        "Col2", CALCULATE ( CONCATENATEX ( DISTINCT ( Table1[Col2] ), Table1[Col2], ";" ) ),
        "Col3", CALCULATE ( CONCATENATEX ( DISTINCT ( Table1[Col3] ), Table1[Col3], ";" ) )
    )

     

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers