# Power Query: Sum values on duplicate dates



## CascadeDiver (Oct 6, 2020)

I have a Power Query that has entries on duplicate dates. I am looking to sum all the values on duplicate dates.
In the example below I have Dates in the first column, Names across the next several columns, and the values that need to be summed within the table




The outcome would consist of date rows (only one row per date) and the all values summed and under their respective names. In this example there are only under the first two name column have multiple values within the dame date.


----------



## alansidman (Oct 6, 2020)

```
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Forest", Int64.Type}, {"Riley", Int64.Type}, {"Janet", Int64.Type}, {"Jim", Int64.Type}, {"Beau", Int64.Type}, {"Michael", Int64.Type}, {"Aaron", Int64.Type}, {"Bryan", Int64.Type}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Date"}, "Attribute", "Value"),
    #"Pivoted Column" = Table.Pivot(#"Unpivoted Other Columns", List.Distinct(#"Unpivoted Other Columns"[Attribute]), "Attribute", "Value", List.Sum)
in
    #"Pivoted Column"
```

Book12ABCDEFGHI1DateForestRileyJanetJimBeauMichaelAaronBryan210/5/2020552322310/6/2020423410/7/2020234Sheet2


----------



## CascadeDiver (Oct 8, 2020)

Thank you for your help.
My apologies in the delayed response.


----------

