Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
8 |