Forum Discussion
jgachon
1 year agoNew Member
table with compound interest in dax
Hi everyone
Would someone know how to reproduce this simple table excel using dax ?
| Année | capital de départ | performance | intérêts |
| 1 | 10 000,00 € | 2,50% | 250,00 € |
| 2 | 10 250,00 € | 2,50% | 256,25 € |
| 3 | 10 506,25 € | 2,50% | 262,66 € |
| 4 | 10 768,91 € | 2,50% | 269,22 € |
| 5 | 11 038,13 € | 2,50% | 275,95 € |
| 6 | 11 314,08 € | 2,50% | 282,85 € |
| 7 | 11 596,93 € | 2,50% | 289,92 € |
| 8 | 11 886,86 € | 2,50% | 297,17 € |
| 9 | 12 184,03 € | 2,50% | 304,60 € |
| 10 | 12 488,63 € | 2,50% | 312,22 € |
thanks for your help 🙂
Hi jgachon - Please find the attached pbix file.
I have created few calculated columns in investment table. please check.
Hope this helps.
4 Replies
- rajendraongole1
Super User
Hi jgachon - Please find the attached pbix file.
I have created few calculated columns in investment table. please check.
Hope this helps.
- DataNinja777
Super User
Hi jgachon ,
You can reproduce the Excel-style compound interest table in Power BI using the following DAX to create a calculated table. This avoids circular references by computing each row using the compound interest formula directly:
CapitalTable = VAR InterestRate = 0.025 VAR InitialCapital = 10000 VAR Years = GENERATESERIES(1, 10, 1) RETURN ADDCOLUMNS ( ADDCOLUMNS ( Years, "capital de départ", VAR YearNum = [Value] RETURN InitialCapital * POWER(1 + InterestRate, YearNum - 1), "intérêts", VAR YearNum = [Value] RETURN InitialCapital * POWER(1 + InterestRate, YearNum - 1) * InterestRate, "performance", "2.50%" ), "Année", [Value] )This will generate the full 10-year table with capital, interest, and fixed performance rate using DAX.
Best regards,