<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Running Balance based on difference of 2 rows plus the previous row. - Power Query				            </title>
            <link>https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row</link>
            <description>My Online Training Hub Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Sun, 14 Jun 2026 00:40:20 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Running Balance based on difference of 2 rows plus the previous row.</title>
                        <link>https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-28417</link>
                        <pubDate>Wed, 03 May 2023 19:48:48 +0000</pubDate>
                        <description><![CDATA[Hi Team,

 

Thank you so much for your help I was now able to make it work. Appreciate it so much.

More power!

 

Kind regards,

John]]></description>
                        <content:encoded><![CDATA[Hi Team,

 

Thank you so much for your help I was now able to make it work. Appreciate it so much.

More power!

 

Kind regards,

John]]></content:encoded>
						                            <category domain="https://www.myonlinetraininghub.com/excel-forum/power-query">Power Query</category>                        <dc:creator>John Canlas</dc:creator>
                        <guid isPermaLink="true">https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-28417</guid>
                    </item>
				                    <item>
                        <title>RE: Running Balance based on difference of 2 rows plus the previous row.</title>
                        <link>https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-28412</link>
                        <pubDate>Wed, 03 May 2023 12:34:49 +0000</pubDate>
                        <description><![CDATA[Hi John,

This isn&#039;t your typical Running Total so the code I wrote for Power Query Running Totals would not work without modification.

So, I&#039;ve written a different query that uses List...]]></description>
                        <content:encoded><![CDATA[Hi John,

This isn't your typical Running Total so the code I wrote for <a href="https://www.myonlinetraininghub.com/quickly-create-running-totals-in-power-query">Power Query Running Totals</a> would not work without modification.

So, I've written a different query that uses List.Sum and List.FirstN to SUM the differences between each row.  This requires creating a temp column to calculate these differences, then you just sum them.

See attached file.

Regards

Phil]]></content:encoded>
						                            <category domain="https://www.myonlinetraininghub.com/excel-forum/power-query">Power Query</category>                        <dc:creator>Philip Treacy</dc:creator>
                        <guid isPermaLink="true">https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-28412</guid>
                    </item>
				                    <item>
                        <title>RE: Running Balance based on difference of 2 rows plus the previous row.</title>
                        <link>https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-28409</link>
                        <pubDate>Wed, 03 May 2023 00:57:28 +0000</pubDate>
                        <description><![CDATA[Mynda has a great video on the subject, you can find it here, come back if you need further help.]]></description>
                        <content:encoded><![CDATA[Mynda has a great video on the subject, you can find it <a href="https://www.myonlinetraininghub.com/quickly-create-running-totals-in-power-query">here</a>, come back if you need further help.]]></content:encoded>
						                            <category domain="https://www.myonlinetraininghub.com/excel-forum/power-query">Power Query</category>                        <dc:creator>Jessica Stewart</dc:creator>
                        <guid isPermaLink="true">https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-28409</guid>
                    </item>
				                    <item>
                        <title>Running Balance based on difference of 2 rows plus the previous row.</title>
                        <link>https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-6291</link>
                        <pubDate>Tue, 02 May 2023 22:40:40 +0000</pubDate>
                        <description><![CDATA[Hello, 

I hope you are all well.

I&#039;m just an average excel user. I need help to create a power query for running balance/total.

Basically in an ordinary excel formula, I can compute...]]></description>
                        <content:encoded><![CDATA[Hello, 

I hope you are all well.

I'm just an average excel user. I need help to create a power query for running balance/total.

Basically in an ordinary excel formula, I can compute for running balance/ total by:

1st row -&gt; Payout - Cash in (B2-A2)

2nd row -&gt; Payout - Cash in + difference of previous row (B3-A3) + C2.

3rd row -&gt; Payout - Cash in + difference of previous row (B4-A4) + C3.

So on and so forth...

<table style="border-collapse: collapse;width: 378px;height: 467px" width="241">
<tbody>
<tr style="height: 15.0pt">
<td class="xl16" style="width: 46pt;height: 15.0pt" width="61" height="20">Cash in</td>
<td class="xl16" style="width: 53pt" width="70">Payout</td>
<td class="xl16" style="width: 83pt" width="110">Running Balance</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">0.25</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-0.25</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">0.75</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-1</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">1.5</td>
<td class="xl16" align="right">0.5</td>
<td class="xl16" align="right">-2</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">1.25</td>
<td class="xl16" align="right">0.5</td>
<td class="xl16" align="right">-2.75</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">1</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-3.75</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">0.25</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-4</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">0.75</td>
<td class="xl16" align="right">0.3</td>
<td class="xl16" align="right">-4.45</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">0.5</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-4.95</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">2.25</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-7.2</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">2.25</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-9.45</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">0.75</td>
<td class="xl16" align="right">2.5</td>
<td class="xl16" align="right">-7.7</td>
</tr>
<tr style="height: 15.0pt">
<td class="xl16" style="height: 15.0pt" align="right" height="20">1</td>
<td class="xl16" align="right">0</td>
<td class="xl16" align="right">-8.7</td>
</tr>
</tbody>
</table>
Can anyone help me please apply this in power query? I know I could just use the basic formula, but the reason why I want it in power query is because, I also have an updating data that I have also made some formatting in power query and I wanted to integrate this with my existing.

Appreciate if you can be detailed in the explanation that you will be providing. Thank you so much in advance.

Here is the link to my excel file: https://1drv.ms/x/s!AtBSy5wV0oBqgvIdcz8lLtx9V2wo3g?e=lqbbaQ

 

Kind regards,

John]]></content:encoded>
						                            <category domain="https://www.myonlinetraininghub.com/excel-forum/power-query">Power Query</category>                        <dc:creator>John Canlas</dc:creator>
                        <guid isPermaLink="true">https://www.myonlinetraininghub.com/excel-forum/power-query/running-balance-based-on-difference-of-2-rows-plus-the-previous-row#post-6291</guid>
                    </item>
							        </channel>
        </rss>
		