Master running totals across time intervals without complex manual formulas

Are you struggling to generate meaningful insights from your project data?

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

This is a request that is far more common than most spreadsheet users realize. The user, who we will call the builder, has a clean dataset, weekly rows, monthly groupings, and three value columns, and they want running totals that respect both time and category boundaries. The problem is not the data itself; the problem is that traditional spreadsheets force you to write conditional formulas that grow brittle as your dataset grows. The builder is asking Power Query to do what should be straightforward: calculate a running total overall, a running total within each month, a running total that resets at the start of each month, and a static monthly total. That is four different calculations for each of three value columns, and the manual formula approach would require nested IF statements, careful row locking, and constant maintenance. The builder is right to look for a better way.

What the builder has discovered is that Power Query, when paired with the right approach, handles this kind of grouped accumulation naturally. The key insight is that running totals are not about formulas; they are about context. In Power Query, you can group by month, then apply a cumulative sum that resets at each group boundary. The overall running total ignores the month boundary entirely, while the monthly running total stops and restarts. The "InMonth Only" column is actually the same as the monthly running total, but the builder wants it labeled separately, perhaps for reporting clarity. The "ThisMonth" column is the static total for that month, which is simply the sum of all values in the month group, repeated for each row. That is four distinct operations, but none of them require a single manual formula. They require understanding how to use the Table.Group and List.Accumulate functions, or the simpler approach of adding an index column and using a grouped cumulative sum with List.Sum.

The practical takeaway for anyone reading this is straightforward: if you are still writing SUMIF formulas that reference the row above, you are working harder than you need to. The builder's dataset is small here, but imagine scaling this to hundreds of projects, regions, and value columns. The manual approach breaks down because every new row requires formula adjustments, and every new grouping requires rewriting logic. Power Query, by contrast, treats the running total as a transformation rule applied to the entire table. Once you define the grouping and the cumulative logic, it scales automatically. The builder's output shows exactly this: four columns, repeated for each value, with no formula cells in sight.

This is not about replacing spreadsheets. It is about using the right tool for the job. The builder has identified a recurring pattern, grouped running totals across time intervals, and has chosen to solve it in a way that is repeatable, auditable, and scalable. That is the kind of thinking that separates a data manager from someone who just manages data. If you find yourself repeating the same formula pattern across multiple columns, or if your workbook has more conditional logic than raw data, take the builder's approach: step back, identify the pattern, and let the tool do the repetition.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

This is the sample layout of my dataset:

Im trying to generate this table in Power Query which will add 4 new grouped running total columns for each value columns:

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community