Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

powerquery merge ?

hello,

 

sorry if this is too easy question.

I would like to do like following in powerquery.

Is there any way to do this on powerquery? or shoud I do this with dax?

 

 

 

  • Try :

    = Table.Group(#"Changed Type", {"Id"}, {{"List of works", each Text.Combine([Work],", "), type text}})

     

  • Hi,

    This M code works

    let
        Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
        #"Grouped Rows" = Table.Group(Source, {"Id"}, {{"All Work", each Text.Combine(List.Distinct([Work]), ", "), type text}})
    in
        #"Grouped Rows"

    Hope this helps.

6 Replies

  • Anonymous 

    a new meausre concatenatex(distinct(Table[Work]),[Work]) 

     

    a new table

    summarize(Table, Table[id],"_work",concatenatex(distinct(Table[Work]),[Work]))

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak 

      Thank you for your help!

      Is there any way to do this with PowerQuery😅??

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support

    Try :

    = Table.Group(#"Changed Type", {"Id"}, {{"List of works", each Text.Combine([Work],", "), type text}})

     

  • Hi,

    This M code works

    let
        Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
        #"Grouped Rows" = Table.Group(Source, {"Id"}, {{"All Work", each Text.Combine(List.Distinct([Work]), ", "), type text}})
    in
        #"Grouped Rows"

    Hope this helps.