Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to Concatonate several columns.

Hello,

 

I want to create a new colomn that concatonates three colomns into one key.  eg. I want Month, name and vrg to be in a field beside this that says JAN5 GUYS CSD 500ml PET.  What is the simpletst way to do that?

 

MonthsNAMEVRGMonths Order
JAN5 GUYSCSD 500ml PETM01 JAN
JAN5 GUYSDAS  591mlM01 JAN
JAN5 GUYSNT 500mlM01 JAN
JAN5 GUYSPostmix Jc BIB 10LM01 JAN
JAN5 GUYSPostmix Jc BIB 20LM01 JAN
JAN5 GUYSPostmix Spk BIB 10LM01 JAN
JAN5 GUYSPostmix Spk BIB 20LM01 JAN
  • I would recommend using Power Query to do this. Select each column in order you want them concatenated, then click Merge columns on the Add Column tab in Power Query Editor.
  • The best way for this, is using Power Query (select columns -> tab Add Column -> Merge OR select columns, right click on then and "merge").

     

    Also, if you want to do this on a calculated column (less performance), create a new column using DAX expression CONCATENATE. 

     
    Your Column = CONCATENATE('Table'[Column 1], 'Table'[Column 2]...)
     
    Remember: Power Query is the recomended away to do this. 🙂

2 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Icon for Community Champion rankCommunity Champion
    I would recommend using Power Query to do this. Select each column in order you want them concatenated, then click Merge columns on the Add Column tab in Power Query Editor.
  • The best way for this, is using Power Query (select columns -> tab Add Column -> Merge OR select columns, right click on then and "merge").

     

    Also, if you want to do this on a calculated column (less performance), create a new column using DAX expression CONCATENATE. 

     
    Your Column = CONCATENATE('Table'[Column 1], 'Table'[Column 2]...)
     
    Remember: Power Query is the recomended away to do this. 🙂