Forum Discussion
Anonymous
3 years agoNot applicable
Compounding Interest Table
Hello, I would like to replicate this table in Excel below, but using Power BI. and there is interest rate in cell C16. In Excel, for Cell D2, the value would be: D2 =C2*(1+$...
- 3 years ago
lbendlin
Super User
3 years agoPower Query version:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Xc3LDQAhCEXRXli7eALOpxZj/20MmIkQlvcAYU5isFCjDoBW263WnHpYD42+/v0Dt8GJx6f5/HWQAIFDeii9AleQChqwPg==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Year = _t, Savings = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}, {"Savings", Currency.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Future Value", each List.Accumulate({0..[Index]},0,(state,current)=>(state+#"Added Index"[Savings]{current})*1.1)),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Future Value", Currency.Type}})
in
#"Changed Type1"
Since you are adding data in each iteration you cannot do this calculation in DAX.