group accumulate function


I am trying to use the group accumulate function to apply a running total to a workbook and it is not calculating and I am unsure what I am doing incorrectly.


Food Slices Number of Orders Running Total Total
Pizza 1 3892 3892 5358
Pizza 2 188 4080 5358
Pizza 3 217 4297 5358
Pizza 4 228 4525 5358
Pizza 5 512 5037 5358
Pizza 6 321 5358


I am wanting to replicate the Running Total column as shown calculated from excel


My data link has Food, and Slices.


Number of Orders and Total have been created by groupby and joining another sheet in the workbook.

What would be the best way to achieve the running total?

Matthew Burns

Official comment

  • Avatar
    Joel Stewart

    Hi Matthew, the GROUPACCUMULATE function should be exactly what you're looking for. It's important to note that it pairs specifically with a group series function (i.e. GROUP_SORT_ASC). For example using the data that you provided, here are the columns that I would create in a new sheet to replicate the Running Total value that you have above:

    • GROUPBY(#SheetName!Food)
    • GROUP_SORT_ASC(#SheetName!Slices)
    • GROUPACCUMULATE(#SheetName!Slices; #SheetName!NumberOfOrders)




Please sign in to leave a comment.