Forum Discussion

KNP's avatar
KNP
Icon for Super User rankSuper User
7 years ago
Solved

Power Query - Aggregate Columns with Dynamic Column Names

Hi,   After much unsuccessful googling, I'm looking for help dealing with aggregating column names that are dynamic. I'm sure there's a simple pattern or function to do this but I have Friday brai...
  • ImkeF's avatar
    ImkeF
    7 years ago

    Hi KNP 

     

    You can use this formula to make the solution dynamic:

     

        #"Aggregated data"  = Table.AggregateTableColumn(Source, "data", List.Transform(DistinctValue, each {_, List.Sum, "Sum of " &_}))