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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.