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.
Need experts help here as have been banging my head against this for awhile. Tried using @OwenAuger s circular reference calculation but was unable to as my issue has percentages. Here is the issue i need to do a simple amortization of a balance.
i have one table containing the amortization in percetages with a time index. See below:
I have another table with the balance:
All i want is to apply -.1*1,000,000=900,000 for the first time period then for the second time period start with 900,000 and multiply that by -0.2.
Here is what i can come up with, as you can see it's not working right.
The Amort measure is as below:
Solved! Go to Solution.
Hi @Anonymous
Attached is an example of how I would handle this.
The main requirement is to calculate the Closing Balance first by taking a cumulative product of (1-Factor) multiplied by the Initial Principal.
Principal Sum = SUM ( Principal[Initial Principal] ) Closing Balance = VAR MaxTime = MAX ( 'Time'[Time Index] ) RETURN SUMX ( 'ID', VAR PrincipalSum = [Principal Sum] VAR ClosingBalance = PrincipalSum * CALCULATE ( PRODUCTX ( AmortizationPercentages, (1 - AmortizationPercentages[Factor] ) ), 'Time'[Time Index] <= MaxTime, ALL ( 'Time' ) ) RETURN ClosingBalance ) Opening Balance = VAR MaxTime = MAX ( 'Time'[Time Index] ) VAR OpeningBalance = IF ( MaxTime = 1, [Principal Sum], CALCULATE ( [Closing Balance], ALL ( 'Time' ), 'Time'[Time Index] = MaxTime - 1 ) ) RETURN OpeningBalance AmortCalc = [Closing Balance] - [Opening Balance]
The above measures should aggregate correctly across multiple IDs but I haven't tested that.
Hopefully that's some help 🙂
Regards,
Owen
Hi @Anonymous
Attached is an example of how I would handle this.
The main requirement is to calculate the Closing Balance first by taking a cumulative product of (1-Factor) multiplied by the Initial Principal.
Principal Sum = SUM ( Principal[Initial Principal] ) Closing Balance = VAR MaxTime = MAX ( 'Time'[Time Index] ) RETURN SUMX ( 'ID', VAR PrincipalSum = [Principal Sum] VAR ClosingBalance = PrincipalSum * CALCULATE ( PRODUCTX ( AmortizationPercentages, (1 - AmortizationPercentages[Factor] ) ), 'Time'[Time Index] <= MaxTime, ALL ( 'Time' ) ) RETURN ClosingBalance ) Opening Balance = VAR MaxTime = MAX ( 'Time'[Time Index] ) VAR OpeningBalance = IF ( MaxTime = 1, [Principal Sum], CALCULATE ( [Closing Balance], ALL ( 'Time' ), 'Time'[Time Index] = MaxTime - 1 ) ) RETURN OpeningBalance AmortCalc = [Closing Balance] - [Opening Balance]
The above measures should aggregate correctly across multiple IDs but I haven't tested that.
Hopefully that's some help 🙂
Regards,
Owen
Wow amazing! Let me try this out today and work it out. Am sure it will work. Thanks for your help @OwenAuger !!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |