Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Combine Two Columns

Hi community..!!

 

I wanted to append the two columns in one column. Please refer the below image.

I wanted to create new column called as No_of_finals and in that I wanted to append Winner and Runners_up 

Please anyone could you help me to do that..??

waiting for quick respose..

  • HI Anonymous 

    I am not sure if you could create that column in same table. Instead you can try to create seperate table with below code:-

    table2 = UNION(VALUES(table[winner]),VALUES(table[runner-up]))

     

    Thanks,

    Samarth

     

5 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    HI Anonymous 

    I am not sure if you could create that column in same table. Instead you can try to create seperate table with below code:-

    table2 = UNION(VALUES(table[winner]),VALUES(table[runner-up]))

     

    Thanks,

    Samarth

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi CNENFRNL 

      Which is Previous Step you are talking about? I did not get.

      • Ross_PBI's avatar
        Ross_PBI
        Frequent Visitor

        I'm not familiar with List.Combine buy you try either of these options

        = Table.AddColumn(#"Previous Step", "No_of_finals", each [Winner]&[Runners-Up])

        or

        = Table.AddColumn(#"Previous Step", "No_of_finals", each Text.Combine({[Winner], [Runners-Up]}, ""), type text)

        where #"Previous Step" refers to the name of the last step in your current query