Forum Discussion
Fraze
Helper I
4 years agoUsing previous row in current row calculation
Hello, trying to create an outstanding column using data from the previous row. See example below for situation. ID #1 has no previous data, so the outstanding balance is the Net change of $1...
- 4 years ago
Fraze can you try this
Column = SUMX ( FILTER ( 'Table', 'Table'[Date] <= EARLIER ( 'Table'[Date] ) && 'Table'[Customer] = EARLIER ( 'Table'[Customer] ) ), 'Table'[Net Change] )
AlexisOlson
Super User
4 years agoYou may be interested in these prior similar posts:
https://community.powerbi.com/t5/Desktop/Calculating-Daily-values-from-Cumulative-Total/m-p/2198969
- Fraze4 years ago
Helper I
Good idea. But rather than extrapolating the cumultive totals, i need to create the cumulative totals by customer. Creating an index would not work because it would only match the previous value, rather than the cumulative previous values. happy to be wrong though if I am not seeing something
- AlexisOlson4 years ago
Super User
Whoops. I had the goal backward in my head (the links I gave wanted to deconstruct an existing cumulative column).
Here's how you can get the running total:
https://community.powerbi.com/t5/Desktop/How-to-do-a-running-Sum-by-group-in-Power-Query/m-p/290123