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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
GINMED
Helper III
Helper III

Calculate Interest payments in loan repayment schedule

Hi,

I need your support in Beginning balance and Ending balance calculations!

I have stucked with interest payment because there is first payment indicated as amount.

GINMED_0-1673974187368.png

How can I put such calculation in Beginning and Ending formula?

There is my calculations but it is wrong in such scenario.

 

Beginning Balance =
Var PV = sum('Līgumi'[PV])
Var Interest = SELECTEDVALUE('Līgumi'[Rate in period])
Var Index = SELECTEDVALUE('Project'[Sequence])
Var Payment = MIN('Līgumi'[Rent payment])
Var Result =
             if(PV *
                     POWER( 1 + Interest, Index - 1 ) - Payment * DIVIDE( POWER( 1 + Interest, Index- 1 ) - 1 , Interest) >= 0,
                PV *  POWER( 1 + Interest , Index - 1 ) - Payment * DIVIDE( POWER( 1 + Interest, Index- 1 ) - 1 ,Interest),0) RETURN Result

 

Ending Balance = if([Beginning Balance] - ([Payment] - ([Beginning Balance] * sum('Līgumi'[Rate in period]))) >= 0, [Beginning Balance] - ([Payment] - ([Beginning Balance] * sum('Līgumi'[Rate in period]))),0 )

 

I allready calculate interest with FIRST payment, but I dont know how correctly to put it in Beginning and Ending calculations.

GINMED_2-1673974754046.png

 

There is my sample data.

 

Thank you in advance,

GINMED

0 REPLIES 0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.