Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
table1
year | forecasted_month |
2023 | 12 |
2023 | 1 |
2023 | 2 |
I have a table that looks like this and I want to create a new column called forecasted_year where it adds 1 to year whenever forecasted_month hits 1 again.
My expected outcome would look like this if it works as intended
forecasted_year |
2023 |
2024 |
2024 |
Is there any way to do this in DAX or Power Query?
Neither DAX nor Power Query have a concept of mutable variables. You need to bring your own index column to make this work.
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 |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |