Forum

Grouped Running Tot...
 
Notifications
Clear all

Grouped Running Totals for Two Columns

2 Posts
2 Users
0 Reactions
97 Views
(@dani104)
Posts: 50
Trusted Member
Topic starter
 

Hello,

I would like to add Grouped Running Totals, by using 2 columns to calculate the running totals.

I found the post "Grouped Running Totals" ( https://www.myonlinetraininghub.com/grouped-running-totals-in-power-query), and have copied the fx and attempted to add the code for the list buffer.  But am uncertain how to create the list buffer using two columns.  In the attached example, I would like to create the running total for "Month Total", by grouping "Model" and "State".

Grateful if you could please point me in the right direction.

Many thanks, Danielle

 
Posted : 23/05/2021 8:50 am
Philip Treacy
(@philipt)
Posts: 1630
Member Admin
 

Hi Danielle,

You need to create a composite column made up of the Model & State which will give you values like AGF535VCSA, AGG503VCXQNSW etc

This composite column is then passed into the function and you'll get your running total back out.

Please see attached file for solution.

regards

Phil

 
Posted : 23/05/2021 10:39 pm
Share: