Forum Discussion

tondeli's avatar
tondeli
Icon for Advocate I rankAdvocate I
8 years ago
Solved

Merge columns between column values, dynamic count of columns

In my data I have id-key, dimension and dimension value. Three columns total. I don't know how many different values dimension column holds (0,1,2...n). I have pivoted my data so that dimensions will...
  • MarcelBeug's avatar
    MarcelBeug
    8 years ago

    A dynamic solution:

     

        #"Added Custom" = 
            Table.AddColumn(
                #"Pivoted Column",
                "Merged", 
                each Text.Combine(
                    List.Transform(
                        List.Skip(
                            Record.FieldValues(_)), 
                        each Replacer.ReplaceValue(
                            Text.From(_),
                            null,
                            "")),
                    " - "),
                type text)