Forum Discussion

gvg's avatar
gvg
Post Prodigy
7 years ago
Solved

Summarize by category in Power Query

Hi there,

 

I want to summarize a column by category in Power Query. Not to group, but summarize. I.e. my initial table looks like this:

 

ProductID    OrderDate  Quantity
123          1/1/2018     3
124          1/1/2018     4
123          2/5/2018     7

The resulting table I expect like this:

ProductID    OrderDate  Quantity  SumQuantity
123          1/1/2018     3        10
124          1/1/2018     4         4
123          2/5/2018     7        10

How do I do that? Would appreciate any ideas to move forward.

  • Hi gvg,

     

    you have to create a table which performs the GROP BY, then merge this table with the original table and expand only the SumOfQuantiy Column

3 Replies

  • Hi gvg,

     

    you have to create a table which performs the GROP BY, then merge this table with the original table and expand only the SumOfQuantiy Column

    • gvg's avatar
      gvg
      Post Prodigy

      OK, this makes sense. No other way to summarize? Somehow by creating temporary lists, etc. ?