Forum Discussion
sigtopo
2 years agoFrequent 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;...
AlexisOlson
2 years agoSuper 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] )