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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
allard
Frequent Visitor

calculate outstanding balance of loans

Hello All, 

 

I am looking to calculate my outstanding amount per loan, but I can't get it right. I got 11 outstanding loans.

I got five Excel tables

  • Calender Table
  • Investment Table 
  • Wallet table
  • Measure table
  • Lenderstable 

In the investment Excel file there are the following columns: 

- Investment number

- Investment 

- Paymentnumber 

- Date 

- Time 

- Outstanding amount

- Gross installment payment

- Capital Reimbursement 

- Interest 

- Tax

- Net instalment 

This Excel is filled like an amortization table. So multiple transactions. 

 

I got a seperate Excel table with the transactions of my wallet. 

In here are the investments I made, so the total of transactions is my actual balance amount. 

 

I used these measures:

To get the transactions which are made for project investements from my wallet: 

Transactions investments =
CALCULATE(
    [Transactions total],
    'Goparity Transacties',
    'Goparity Transacties'[Transaction type] = "project investment")
 
To get the total capital reimbursement: 
Total Capital Reimbursement = sum('Goparity investeringen'[Capital Reimbursement])
 
The problem I am facing if I use a sum function to deduct the two measures from each other I get zero. At the end of the loan ofcourse it is zero, but I want to see the remaining amount per period. 
 
allard_0-1672862682728.png

 

 
 
 
 
Any help is welcome 🙂 
 
 
10 REPLIES 10
allard
Frequent Visitor

I kind of made what I want, but I got the idea it can be done with one formula instead of 20. 

allard_0-1673100095182.png

First I calculated all the Capital Reimbursement per years 2022-2029. 

Second I calculated the outstanding capital in 2022- Capital reimbursement in 2022.

Totaal amount outstanding 2022 = CALCULATE([invested 2022]-[Capital Reimbursement2022])
Copy this for 2022-2029 and i got my diagram. The only problem is I can't use it in a line graph, because I filtered the years with my measures.

 

Hi,

i still do not know what you want but this is my interpretation of your requirement.  I have taken the last outstanding amount of each investor for each year from the Goparity investeringen table.

You may download my PBI file from here.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Dear Asish, 

 

This is kind of what I want, but I am wondering if the amounts that are being calculated are right. For example the outstanding balance in 2022 = 903,95. If I sum up the data in the graph this does not add up to 903,95

Hi,

As i mentioned earlier, i cannot understand what you want.  If you can show the result in a simple table with an explanation, I can probably help.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello Ashish, 

 

Apologies for the late reply. 

I want something like this within power bi, I made the adjustments in excel.

allard_0-1673458046325.png

I don't know if it is even possible, but could this also be one line? That is the sum of all the outstanding loans? 

Anonymous
Not applicable

Hi  @allard ,

 

If you want to see the fields for each period, you can consider grouping each period by adding [per period] =max([per period]) to it when using measure.

For example:

vyangliumsft_0-1672895793308.png

Measure =
var _groupvalue1=
SUMX(FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])),[Value1])
var _groupvalue2=
SUMX(FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])),[Value2])
return
_groupvalue1 - _groupvalue2

vyangliumsft_1-1672895793309.png

 

MAX function (DAX) - DAX | Microsoft Learn

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Liu Yang 🙂 ,

 

I couldn't get your formula, but that is mabye because of me. I posted my PBIX file for you to have a look and hope it clears up a couple of  things. 

Thank you in advance 🙂

I anonymised my data.

Here is the wetransfer link for the PBIX and excel data 🙂

https://we.tl/t-jVAdgS4yw1

 

Hi,

Does the table on the right get you your desired result?  Download the PBI file from here.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Asish, 

 

I don't think your solution is exactly what I want, but anyway thank you for your answer.

 

What I actually want is a chart with my outstanding money per year and per loan. 

So I want my total invested amount (Measure is called: Totaal geinvesteerd) - My total Capital Reimbursment.


I don't think i can use the Outstanding amount column in table 'goparity investeringen', because there are multiple transactions in the table and the my outstanding amount will be much larger than it exactually is. 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.