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
EddyW
Frequent Visitor

Goal Seek to Each Row for Effective Interest Rate

Hello Everyone,

 

Before I explain what my problem is, please read my case first:

 

Company A have to loan using 2 source of fund, which backed up by loan and capital, respectively 70% and 30%. This company using this proportion to get cash in short time but still efficient. They know each rate of source funding (Attached in following Excel). But the management wanted to know the Effective Interest Rate (EIR) of total cost.

 

Example EIR.xlsx 

 

Assume the loan installment is not known, in order to calculate EIR, i only have two main components:

  • Loan Tenure or Period of Loan
  • Loan Amount

(While the effective interest is obtained by using goal seek.)

 

Actually, i can do this in Microsoft Excel using goal seek property in vba. However, i feel like it takes too long (had to calculate to each row for 150k+ times) around one hour and the company asked me to apply it in PowerBI. I also have read some articles here in powerBI using Binary-search algorithm, but i don't really understand the script and where to get started. Did anyone can help me to create this script?

 

Warm Regards,

Eddy W.

 

1 ACCEPTED SOLUTION
ImkeF
Super User
Super User

Hi @EddyW ,
if you want a fast calculation, I strongly recommend to use DAX in this case. Using the RATE function after using the PMT-function does the trick. See enclosed file. 150k rows load in a couple of seconds.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

3 REPLIES 3
ImkeF
Super User
Super User

Hi @EddyW ,
if it is strongly related to your original question or you have a question to my answer, then doing it here is fine.

Otherwise just open a new thread and @ImkeF  me in there so that it pops up in my notifications.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

ImkeF
Super User
Super User

Hi @EddyW ,
if you want a fast calculation, I strongly recommend to use DAX in this case. Using the RATE function after using the PMT-function does the trick. See enclosed file. 150k rows load in a couple of seconds.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

EddyW
Frequent Visitor

Hello @ImkeF 

Thank you so much for the DAX formula. It's really frustrating for me to calculate those using goalseek vba 😂. By the way, i would like to ask again. Since it is still related to this question and i'm still new here, may i ask something again over here or i should ask in another discussion?

 

Best Regards,

Eddy W.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors