Forum Discussion

o59393's avatar
o59393
Post Prodigy
5 years ago
Solved

How to combine only unique values for different columns

Hi    I have gone from        to       Would it be possible in the second image to include the Region and Country in separated columns?   I try the code:   #"Grouped Rows" =...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi o59393 

     

    I think you probably want to do it

    #"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {
    {"Sub Region", each Text.Combine(List.Distinct([Sub Region]),", "), type text}
    ,{"Region", each Text.Combine(List.Distinct([Region]),", "), type text}
    ,{"Country", each Text.Combine(List.Distinct([Country]),", "), type text}
    })
    in
        #"Grouped Rows"