web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating a Principle a...
Power Apps
Answered

Creating a Principle and Interest calculaltor

(0) ShareShare
ReportReport
Posted on by 144

Hi all,

 

I'm trying to achieve the below output that I have here in excel into PowerApps:

cnr_3-1643822331004.png

 

However Im currently stuck on this - where my first record is repeated for all 8 records.

But what I need to do is to have the following record take the new Principle, then multiple it by my Rate (0.06) to give the Interest

So record 2's interest would be 4,117,200 (68,620,000 * 0.06)

cnr_2-1643822310904.png

 

Ive been trying to use a mix of ForAll, Sequence and Clearcollect but I have not luck so far - Would greatly appreciate any insights 

 

Thanks

Conor

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @cnr 

    If you could share some of the formulas you have tried and anything you feel is close but not working, that would be helpful.

    Is your formula based on a straight line interest of 0.06 per period based on the prior period?

  • jinivthakkar Profile Picture
    4,187 on at

    @cnr you need to implement this like a while loop, please check this out 

     

    https://www.dynamicpeople.nl/en/news/while-loop-powerapps/

     

  • Verified answer
    jinivthakkar Profile Picture
    4,187 on at

    @cnr I followed the steps in this link https://www.dynamicpeople.nl/en/news/while-loop-powerapps/

     

    spend a lot of hours but I and was able to implement this 😎

     

    jinivthakkar_0-1643884696934.png

    Most of the code is same except for OnTimerEnd

     

    Collect(
     colTimer,
     {item: "I am item" & varRuns + 1}
    );
    //Logic for interest calculator starts
    If(
     varRuns = 0,
     Set(
     varPri,
     Value(TextInput1.Text)
     );
     Set(
     varInt,
     Value(TextInput1_1.Text) / 10 * varPri
     );
     ClearCollect(
     myCollection,
     {
     Pi: varPri,
     //73000000
    Int: varInt//4380000
     }
     );
     ,
     Patch(
     myCollection,
     Defaults(myCollection),
     {
     Int: varInt,
     Pi: varPri
     }
     );
     Set(
     varInt,
     varInt
     );
     Set(
     varPri,
     varPri
     );
     
    );
    Set(
     varPri,
     varPri - varInt
    );
    Set(
     varInt,
     varPri * Value(TextInput1_1.Text) / 10
    );
    //Logic for interest calculator ends
    UpdateContext({varRuns: varRuns + 1});
    If(
     varRuns >= varLoopEnd - 1,
     UpdateContext({varTimerStart: false})
    )

     

    Please attached app for your reference, please download and try it.

     

    --------------------------------------------------------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • cnr Profile Picture
    144 on at

    Thanks @jinivthakkar,

     

    This was very helpful. I've almost got it to work, its definitely put me on the right track. Appreciate you taking the time! 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard