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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors