You are on page 1of 29

3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query?

- Microsoft Power BI Community

Register
·
Sign in
·
Help · Go To 
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

This board  Search all content


cancel

Microsoft Power BI Community



Forums

Get Help with Power BI

Desktop

How to do a running Sum by group in Power Query?


Reply
Topic Options 

Anonymous
Not applicable

How to do a running Sum by group in Power Query?


‎10-25-2017
10:23 AM

Hi Everyone,

I am trying to do a running sum by group in Power Query (m language).  Thank you.

All solutions I found was to use DAX which I cannot use for my data at this time.

Here is what my data looks like, I would like a running sum of the cost in a new column.

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 1/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Thank you all.


Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Solved!
Go to Solution.

Labels:
Need Help

Message 1 of 46 (43,221 Views)


1
Reply

1 ACCEPTED SOLUTION

MarcelBeug

Community Champion
In response to Anonymous

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 2/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

‎10-25-2017
01:34 PM

 You can use this query (assuming you want to group on "BU"):
 

let

Source = Table1,

TableType = Value.Type(Table.AddColumn(Source, "Running Sum", each null, type number)),

#"Grouped Rows" = Table.Group(Source, {"BU"}, {{"AllData", fnAddRunningSum, TableType}}),

#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"Location", "Month", "Cost", "Running Sum"}, {"Location",
in

#"Expanded AllData"

With function fnAddRunningSum:

(MyTable as table) as table =>

let

    Source = Table.Buffer(MyTable),

    TableType = Value.Type(Table.AddColumn(Source, "Running Sum", each null, type number)),

    Cumulative = List.Skip(List.Accumulate(Source[Cost],{0},(cumulative,cost) => cumulative & {List.Last(cumulative) + cost})),

    AddedRunningSum = Table.FromColumns(Table.ToColumns(Source)&{Cumulative},TableType)

in

    AddedRunningSum

Specializing in Power Query Formula Language (M)

View solution in original post

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 3/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power
Message 3 of 46 (47,305 BI
Views) Overview  Products  Pricing Solutions  Partners  Resources  Community 


12
Reply

45 REPLIES All forum topics  Previous Topic Next Topic


Jcarofi
Frequent Visitor

‎09-08-2021
01:16 PM

Please and if I want the accumulated taking into account the BU and Location columns

Message 37 of 46 (5,569 Views)


0 Reply

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 4/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

jborro

Power
Solution SageBI Overview  Products  Pricing Solutions  Partners  Resources  Community 

In response to Jcarofi

‎09-08-2021
01:31 PM

These lines:

#"Grouped Rows" = Table.Group(Source, {"BU"}, {{"AllData", fnAddRunningSum, TableType}}),

#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"Location", "Month", "Cost", "Running Sum"}, {"Locat
ion", "Month", "Cost", "Running Sum"})

would look like:

#"Grouped Rows" = Table.Group(Source, {"BU", "Location"}, {{"AllData", fnAddRunningSum, TableType}}),

#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"Month", "Cost", "Running Sum"}, {"Month", "Cost",
"Running Sum"})

Message 38 of 46 (5,549 Views)


0 Reply

Jcarofi
Frequent Visitor
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 5/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

In response to jborro
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

‎09-08-2021
02:51 PM

It doesn't work, I already tried

with a similar data I need to calculate the column accumulated by 2 arguments.

Message 39 of 46 (5,515 Views)


https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 6/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 


0 Reply

jborro

Solution Sage
In response to Jcarofi

‎09-08-2021
03:21 PM

Ok.

This is a modified fnAddRunningSum - nothing really important, just made the values column name a variable to
untie the internal data structure to the main table from the computation logic in the function: 

(MyTable as table, values as text) as table =>

let

Source = Table.Buffer(MyTable),

TableType = Value.Type(Table.AddColumn(Source, "Running Sum", each null, type number)),

Cumulative = List.Skip(List.Accumulate(Table.Column(Source, values),{0},(cumulative,cost) => cumulative & {Li


st.Last(cumulative) + Number.From(cost)})),

AddedRunningSum = Table.FromColumns(Table.ToColumns(Source)&{Cumulative},TableType)

in

AddedRunningSum

This is the main table and the call to the function above using your sample data:

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 7/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

let

Power BI
SourceOverview Products  Pricing Solutions  Partners  Resources  Community 
= Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKlTSUUoEYkMDpVgdBBeVZ4xPEsJLxsoz

wSdpik0yBdVKGNcMlYuNB3JPEgbPBJVrhE1tMqraZKyS5hiSsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t =


((type nullable text) meta [Serialized.Text = true]) in type table [Est = _t, CICL = _t, ve = _t]),

#"Changed Type" = Table.TransformColumnTypes(Source,{{"Est", type text}, {"CICL", type text}, {"ve", type num
ber}}),

TableType = Value.Type(Table.AddColumn(#"Changed Type", "Running Sum", each null, type number)),

#"Grouped Rows" = Table.Group(Source, {"Est", "CICL"}, {{"AllData", each fnAddRunningSum (_, "ve"), TableTyp
e}}),

#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"ve", "Running Sum"}, {"ve", "Runn
ing Sum"})

in #"Expanded AllData"

 Please note that the function call has changed slightly as we added the second parameter (value column name) to
the function which calculates running totals.

This is the output of the main table/query:

EstCICLveRunning Sum
q a 10 10
q a 0 10
q a 30 40
q a 0 40
q a 0 40
c a 0 0
c a 40 40
c a 0 40
c a 50 90
c a 0 90
d a 30 30
d a 60 90
d a 0 90
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 8/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
d a 0 90
d a 0 90
Power
q
BI
b
Overview 
0 0
Products  Pricing Solutions  Partners  Resources  Community 

q b 40 40
q b 20 60
q b 0 60
c b 40 40
c b 0 40
c b 70 110
c b 0 110

Please let me know if you have any questions.

Kind regards,

JB

Message 41 of 46 (5,477 Views)


0 Reply

Jcarofi
Frequent Visitor
In response to jborro

‎09-08-2021
04:43 PM

I want to thank you for responding to my request, but the code has not worked for me, I don't know what I'm doing w
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 9/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

I share the files to see what I'm doing wrong

Power

BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

let

Origen = Excel.Workbook(File.Contents("C:\Users\J024919\Downloads\Prub.xlsx"), null, true),

Est_Table = Origen{[Item="Est",Kind="Table"]}[Data],

#"Tipo cambiado" = Table.TransformColumnTypes(Est_Table,{{"zona", type text}, {"Estado", type text}, {"Estanque", t


TableType = Value.Type(Table.AddColumn(#"Tipo cambiado", "Running Sum", each null, type number)),

#"Grouped Rows" = Table.Group(Est_Table, {"Estanque", "Ciclo"}, {{"AllData", each fnAddRunningSum (_, "Raleo"), Tab
#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"Raleo", "Running Sum"}, {"Raleo", "Runn
in #"Expanded AllData"

Running Funcion

(MyTable as table, value as text) as table =>

let

Source = Table.Buffer(Est),

TableType = Value.Type(Table.AddColumn(Source, "Running Sum", each null, type number)),

Cumulative = List.Skip(List.Accumulate(Table.Column(Source, value),{0},(cumulative,cost) => cumulative & {List.Last


AddedRunningSum = Table.FromColumns(Table.ToColumns(Source)&{Cumulative},TableType)

in

AddedRunningSum

(Arguments) (Est) (CICL) are = "Estanque" "Ciclo"

(ve) is = "Raleo"

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 10/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Message 42 of 46 (5,443 Views)


0 Reply

jborro

Solution Sage
In response to Jcarofi

‎09-08-2021
06:28 PM

I do no think that there is something wrong with the code. It looks Ok.

The error that you get is the "stack overflow", which potentially means that the calculation result does not fit into the
variable type.

Could you please try to filter your table (after #"Tipo cambiado" step) to take only 10 top lines to prove that the
concept works?

Do you have fairly large numbers in the "Raleo" column?

Thanks,

JB
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 11/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
JB

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Message 43 of 46 (5,413 Views)


0 Reply

Jcarofi
Frequent Visitor
In response to jborro

‎09-08-2021
06:43 PM

If you have an email where I can send you the files, I thank you

Message 45 of 46 (5,380 Views)


0 Reply

jborro

Solution Sage
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 12/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
Solution Sage

Power BI toOverview
In response Jcarofi  Products  Pricing Solutions  Partners  Resources  Community 

‎09-12-2021
11:37 AM

Hi @Jcarofi,

if this is still not resolved, you can save the sample files to Google Drive, Dropbox or alike and send me a link via
private message. I can have a look later today. 

Thanks,

JB

Message 46 of 46 (5,263 Views)


0 Reply

Jcarofi
Frequent Visitor
In response to jborro

1 1
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 13/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
‎09-08-2021
06:41 PM
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 
As the function is written in the result, you start creating rows by mixing the (ponds) with the (cycles) creating

Message 44 of 46 (5,396 Views)


0 Reply

Jcarofi
Frequent Visitor
In response to Jcarofi

‎09-08-2021
02:52 PM

I need a help with de Mcode

Message 40 of 46 (5,500 Views)


0 Reply

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 14/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 


Netrelemo

Helper III

‎05-19-2021
06:56 PM

Unbelievable. 

Power Bi has invented a billion new functions and formulas but needs 20 lines of code across a query and embedded function to
calculate the running total? 

Unbelievable. 

Message 36 of 46 (8,829 Views)


1
Reply

Anonymous
Not applicable

‎05-26-2020
12:12 PM

Hi @MarcelBeug 

Would be great if you could help me understand how the below statement is working in the code that you provided. I am having a hard
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 15/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

time understanding it.


Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Cumulative = List.Skip(List.Accumulate(Source[SHIPMENT],{0},(cumulative,SHIPMENT) => cumulative & {List.Last(cumulative) +


SHIPMENT}))

Thanks in advance!

Message 35 of 46 (13,985 Views)


0 Reply

78chris
New Member

‎03-31-2018
03:47 AM

Hello

To MarcelBeug

Thi i d
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 16/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
This is very good.
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 
 

Is it possible to give the Field to use (Cost here) as a parameter of the function ?

Thanks a lot

78Chris

Message 19 of 46 (40,309 Views)


1
Reply

78chris
New Member
In response to 78chris

‎10-18-2018
02:15 AM

Hello

I found a solution and give it


https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 17/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
ou d a so ut o a d g e t

  Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

(MyTable as table, MyColumn as text) =>

let

Source = Table.Buffer(MyTable),

TableType = Value.Type(Table.AddColumn(Source, "Cumul", each null, type number)),

Cumulative = List.Skip(List.Accumulate(Table.Column(Source,MyColumn),{0},(cumulative,MyColumn) => cumulative & {List.Last(cum


Cumul = Table.FromColumns(Table.ToColumns(Source)&{Cumulative},TableType)

in

AddedRunningSum

Message 20 of 46 (36,605 Views)


2
Reply

TheOctopusIAm
Frequent Visitor
In response to 78chris

‎03-20-2020
11:55 AM

This is great, though how should I call this function now that it has two arguments?

@78chris 
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 18/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Message 21 of 46 (14,385 Views)


0 Reply

TheOctopusIAm
Frequent Visitor
In response to TheOctopusIAm

‎03-20-2020
01:09 PM

@78chris 

Thanks Chris, you posted this code to allow me to select the specific column :

(MyTable as table, MyColumn as text) =>

let

Source = Table.Buffer(MyTable),

TableType = Value.Type(Table.AddColumn(Source, "Cumul", each null, type number)),

Cumulative = List.Skip(List.Accumulate(Table.Column(Source,MyColumn),{0},(cumulative,MyColumn) => cumulative


& {List.Last(cumulative) + MyColumn})),

Cumul = Table.FromColumns(Table.ToColumns(Source)&{Cumulative},TableType)

i
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 19/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
in

Power BI
AddedRunningSum
Overview  Products  Pricing Solutions  Partners  Resources  Community 

Below is the original code, which calls this function. What changes need to be made to this to call the function, now
that it has two arguments?

let

Source = Table1,

TableType = Value.Type(Table.AddColumn(Source, "Running Sum", each null, type number)),

#"Grouped Rows" = Table.Group(Source, {"BU"}, {{"AllData", fnAddRunningSum, TableType}}),

#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"Location", "Month", "Cost", "Runn


ing Sum"}, {"Location", "Month", "Cost", "Running Sum"})

in

#"Expanded AllData"

Message 22 of 46 (14,400 Views)


0 Reply

cyongt_bdf

Advocate II
In response to TheOctopusIAm

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 20/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

‎03-21-2020
03:25 AM
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Hi @TheOctopusIAm ,

You may try this code where "ColumnHeader" is your column header name:

let

Source = Table1,

TableType = Value.Type(Table.AddColumn(Source, "Running Sum", each null, type number)),

#"Grouped Rows" = Table.Group(Source, {"BU"}, {{"AllData", fnAddRunningSum(_, "ColumnHeader"), TableType}}),

#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"Location", "Month", "Cost", "Runn


ing Sum"}, {"Location", "Month", "Cost", "Running Sum"})

in

#"Expanded AllData"

Message 23 of 46 (14,385 Views)


2
Reply

TheOctopusIAm
Frequent Visitor
In response to cyongt_bdf

‎03-21-2020
09:26 PM
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 21/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Thanks for the reply @cyongt_bdf. That seems logical, thoughPartners


I'm now getting the following error:

Power BI Overview  Products  Pricing Solutions   Resources  Community 

Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an
'each' expression?

I've had a search around, but can't find any similar scenarios that generate this same error.

Any thoughts? 

Message 24 of 46 (14,370 Views)


0 Reply

cyongt_bdf

Advocate II
In response to TheOctopusIAm

‎03-22-2020
12:19 AM

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 22/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Hi @TheOctopusIAm ,
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

I missed the each keyword, please try this code instead:

let

Source = Table1,

TableType = Value.Type(Table.AddColumn(Source, "Running Sum", each null, type number)),

#"Grouped Rows" = Table.Group(Source, {"BU"}, {{"AllData", each fnAddRunningSum(_, "ColumnHeader"), TableTyp


e}}),

#"Expanded AllData" = Table.ExpandTableColumn(#"Grouped Rows", "AllData", {"Location", "Month", "Cost", "Runn


ing Sum"}, {"Location", "Month", "Cost", "Running Sum"})

in

#"Expanded AllData"

Message 25 of 46 (14,357 Views)


3
Reply

SegerC
Regular Visitor
In response to cyongt_bdf

‎03-31-2020
02:11 PM

Hi @ bdf!
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 23/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community
Hi @cyongt_bdf!
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 
 

I am having trouble getting this to work. I have to apologize, I'm new to M and power queries custom functions.

When I copied the original table submitted by OP, made it into a source and tried to apply the formulas on it
chaning "ColumnHeader" to "Costs". However, I received the following error:

Expression.Error: The import AddedRunningSum matches no exports. Did you miss a module reference?

How do I solve this? Additionally, is the name of the function "query" important, i.e. does it need to
"fnAddRunningSum" or "AddedRunningSum"?

My actual data is regarding COVID-19 from here https://data.europa.eu/euodp/en/data/dataset/covid-19-


coronavirus-data/resource/55e8f966-d5c8-438e-8..., where I'm trying to apply this running sum per country (e.g.
"cases" grouped by "countriesAndTerritories").

Thank you very much!

Message 27 of 46 (14,300 Views)


0 Reply

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 24/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Load more replies

Helpful resources

Announcements

Join us April 6-8


Boost Your Power Platform Expertise across 2 Microsoft Keynotes, 4
Tutorials & 60+ Sessions at the European Power Platform
Conference.

Learn More 

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 25/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Recommendations
Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

‎07-13-2021
 
Running total by group with a reset
02:02 AM

‎08-26-2021
 
SUM IFS in Power Query using a date and article nu...

03:55 AM

‎08-20-2021
 
More efficient running total column in Power Query...
10:09 AM

‎09-14-2021
 
Power Query running slow through google search

02:16 AM

‎12-07-2021
 
Sum of previous Periods Grouped
02:55 AM

Featured Topics

How to Get Your Question Answered Quickly



Top Solution Authors (Last Month)


amitchandak 309
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 26/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 


lbendlin 69

johnt75
58


PaulDBrown 50


Jihwan_Kim 41

See all ≫

Top Kudoed Authors (Last Month)


amitchandak 
344

truptis

161


lbendlin 
114


parry2k 
96


PaulDBrown 
68

See all ≫
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 27/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Power BI Overview  Products  Pricing Solutions  Partners  Resources  Community 

Users online (1,553)

Power Platform Browse Downloads Learn


Overview Solutions Power BI Desktop Guided learning

Power BI Partners Power BI Mobile Documentation

Power Apps Consulting Services Power BI Report Server Support

Power Automate See all downloads Community

Power Virtual Agents Give feedback

Webinars

Developers
Sign in
Blog
Sign up
Newsletter

Privacy & cookies


© 2022 Follow
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 28/29
3/27/22, 11:30 AM Solved: How to do a running Sum by group in Power Query? - Microsoft Power BI Community

Microsoft Power BI Terms of use


Power BI Overview  Products  Pricing Solutions 
Trademarks
Partners  Resources  Community 

https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123 29/29

You might also like