Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Year | Inflation | Inflation Index |
2024 | 0.03 | 1 |
2023 | 0.02 | 0.970874 |
2022 | 0.01 | 0.951837 |
2021 | 0.01 | 0.942413 |
2020 | 0.02 | 0.933082 |
2019 | 0.02 | 0.914786 |
simple table, this year index is always 1
year 2023 is calculated as (2024 index / (1 + 2024 inflation)
year 2023 is calculated as (2023 index / (1 + 2023 iflation)
very easy in excel but cannot do it in PBI as the measure references to itself
can you please help ❤️
Solved! Go to Solution.
Better do this in Power Query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMlHSUTLQMzBWitUB840hfCMY3wjCN4TxDdH4BqjqDS3h/FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Year = _t, Inflation = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Inflation", Percentage.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Inflation Index", each List.Accumulate({0..[Index]},1,(state,current)=>if current=0 then state else state/(1+#"Added Index"{current-1}[Inflation])), Percentage.Type)
in
#"Added Custom"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.
But if you want DAX as a calculated column:
Better do this in Power Query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMlHSUTLQMzBWitUB840hfCMY3wjCN4TxDdH4BqjqDS3h/FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Year = _t, Inflation = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Inflation", Percentage.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Inflation Index", each List.Accumulate({0..[Index]},1,(state,current)=>if current=0 then state else state/(1+#"Added Index"{current-1}[Inflation])), Percentage.Type)
in
#"Added Custom"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.
But if you want DAX as a calculated column:
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |