Forum Discussion

jgachon's avatar
jgachon
New Member
1 year ago
Solved

table with compound interest in dax

Hi everyone

 

Would someone know how to reproduce this simple table excel using dax ? 

 

Annéecapital de départperformanceintérêts
110 000,00 €2,50%250,00 €
210 250,00 €2,50%256,25 €
310 506,25 €2,50%262,66 €
410 768,91 €2,50%269,22 €
511 038,13 €2,50%275,95 €
611 314,08 €2,50%282,85 €
711 596,93 €2,50%289,92 €
811 886,86 €2,50%297,17 €
912 184,03 €2,50%304,60 €
1012 488,63 €2,50%312,22 €

 

thanks for your help 🙂 

4 Replies

    • jgachon's avatar
      jgachon
      New Member

      it helps a lot thanks ! 

    • jgachon's avatar
      jgachon
      New Member

      it helps a lot thanks ! 

  • 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,