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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
sigtopo
Frequent Visitor

Continuous cumulative values

I have a table which contains bank transactions from several accounts (date,  account number,transaction name, value).
For sample :
01/15/2023;Account01;Transaction n°1;-500$
02/10/2023;Account02;Transaction B1;-50$
03/01/2023;Account02;Transaction B2;+550$
03/03/2023;Account01;Transaction n°2;+1500$
03/08/2023;Account01;Transaction n°3;-200$
09/01/2023;Account01;Transaction n°4;+500$

10/04/2023;Account05;Transaction B3;-70$

I have another table which contains the balance of each account on the eve of the first date of the bank transactions table (to initialize the balances).
For sample :
01/01/2023 ;Account01;1000$
01/01/2023 ;Account02;800$

I would like to be able to display a stacked graph of the evolution of the balances of all accounts (one color per account).
Currently, since I don't have a value for each day, the graph is not continuous.
Thanks

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


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

Hi,
This is a Excel File with data sample.
Here is the graph I want to obtainGraphSample.pngThanks 😊

Hi,

How have you arrived at the numbers in column E:F of the Graph worksheet.  Please show the Excel formulas for those columns so that i can translate those in the DAX language.


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

I did it manually 😂

How will i be able to help you then.  Unless i understand the logic, i cannot write the DAX measures.


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

You probably want a date table with a relationship to both tables (you could also consider appending your tables so that the initial balance is the 0th transaction). Then you can write a cumulative measure with the handy WINDOW function.

 

Cumulative Balance =
CALCULATE (
    SUM ( Table1[Amount] ),
    WINDOW ( 1, ABS, 0, REL, ALL ( DateTable ), ORDERBY ( DateTable[Date] ) )
) + SUM ( Table2[Amount] )

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.