Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
steveorme69
Helper I
Helper I

Running Total on more than one field

1st post and only been using Power BI for 2 weeks !

 

I'm trying to build a cashflow report to show running balances across multiple bank accounts/nominal codes, I used the quick measure function but it only gave me the option to use one field for the running total. I need to calculate on the date and the nominal, by using the quick set-up I think it is adding up across all nominal codes with the same dates.

 

Net Balance running total in Date  =
CALCULATE(
 SUM('Sage Trans Raw Data'[Net Balance]),
 FILTER(
  ALLSELECTED('Sage Trans Raw Data'[Date]),
  ISONORAFTER('Sage Trans Raw Data'[Date], MAX('Sage Trans Raw Data'[Date]), DESC)
 )
)

 

 

 

Thanks

Steve

 

 

18 REPLIES 18
Ashish_Mathur
Super User
Super User

Hi,

 

Share the dataset and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Assuming this formula already works, have you tried adding more files into the row containing the sum?  Something like:

 

Net Balance running total in Date  =
CALCULATE(
 SUM('Sage Trans Raw Data'[Net Balance]) + SUM('Sage Trans Raw Data'[SomeOtherField])
 FILTER(
  ALLSELECTED('Sage Trans Raw Data'[Date]),
  ISONORAFTER('Sage Trans Raw Data'[Date], MAX('Sage Trans Raw Data'[Date]), DESC)
 )
)

This would total both the Net Balance and 'SomeOtherField' into a single figure, which is what it sounds like you want?

Hi appreciate your response. 

 

I tried your suggestion but It now shows a syntax error on the filter. 

 

I need the running total on a number of different nominals assigned to each bank account each could have different dates for transactions. Would the code happen in the filter rather than the sum as I want to sum on each change of nominal and date?

 

thanks Steve 

Anonymous
Not applicable

The calculate function is pretty much "Run the first parameter" with the additional filters set in the 2+ parametres.  Most of the time you don't need the Filter function within Calculate, as it already does this.

So if I was to optmise your original formula, again assumign it already worked, it should really look like:

Net Balance running total in Date  =
CALCULATE(
    SUM('Sage Trans Raw Data'[Net Balance]) + SUM('Sage Trans Raw Data'[SomeOtherField]),
    ALLSELECTED('Sage Trans Raw Data'[Date]),
    ISONORAFTER('Sage Trans Raw Data'[Date], MAX('Sage Trans Raw Data'[Date]), DESC),
)

Having edited that formula, i spotted the syntax error.  When i created the formula last time, i missed out a comma between the Sums you want to add up and the filter section.

Many thanks but the [someotherfield] is a text so it doesn't like that.

 

What's the best way to share an example of the data ?

 

Thanks

 

Steve

Hi,

 

I have downloaded the Excel file but your question is not clear.  Please clearly show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

 

I need column G to hold the cummulative balance in changes on column A (nominal code) and column E the date.

 

Thanks

Steve

Hi,

 

You may refer to my solution here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Thank you much appreciated, it has worked at nominal and date level but unfortunately when I group up a level (Nom_sub_level_2) it loses the running total.

 

Regards

Steve

 

 

Hi,

 

I am not clear.  Please show a screenshot of the problem you are facing.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Which file from there do i have to download.  Describe the question clearly and also show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

It's the cash balances running total and I'd expect to see a total across for all bank accounts in the last column

 

Thanks

Steve

Hi,

 

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Sorry but how do I share the power BI output ?

 

Thanks

Steve

 

 

Anonymous
Not applicable

If you are running a reasonable newish version of windows you can make use of the Snipping Tool to take easy screenshots. You can access this from the Run menu (Windows Key + R) and type in SnippingTool.  From here, save the picture to your computer and add it to your reply using the "Photos" button

Thanks Ross..........that was so easy

 

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors