cancel
Showing results for
Did you mean:
Frequent Visitor

## Running total by group

Hey guys,

I'm trying to do a rolling cumulative capital by loan as follows:

 schdule Loan Principal DueDate RT REQUIRED! 1 1abc 300 1/1/2022 300 2 1abc 300 2/1/2022 600 3 1abc 300 3/1/2022 900 4 1abc 300 4/1/2022 1200 5 1abc 300 5/1/2022 1500 6 2df 200 1/1/2022 200 7 2df 200 2/1/2022 400 8 2df 200 3/1/2022 600 9 2df 200 4/1/2022 800 10 3gh 500 1/1/2022 500 11 3gh 500 2/1/2022 1000 12 3gh 500 3/1/2022 1500 13 3gh 500 4/1/2022 2000 14 3gh 500 5/1/2022 2500

I've been going through the forum and tried several answers but nothing works.

Tried with the following but it gives me the full total not cumulative by date.

``Column = CALCULATE( SUMX(loanschedules, loanschedules[principal]), filter(ALLEXCEPT(loanschedules,loanschedules[_loan]), loanschedules[Date.1] <= max(loanschedules[Date.1])))``

Cheers

1 ACCEPTED SOLUTION
Frequent Visitor

Solved. thanks all

``Column = CALCULATE(SUM(loanschedules[principal]), FILTER(ALLEXCEPT(loanschedules,loanschedules[_loan]), loanschedules[Date.1] <= EARLIER(loanschedules[Date.1])))``

Frequent Visitor

Solved. thanks all

``Column = CALCULATE(SUM(loanschedules[principal]), FILTER(ALLEXCEPT(loanschedules,loanschedules[_loan]), loanschedules[Date.1] <= EARLIER(loanschedules[Date.1])))``

Announcements