Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 30 | |
| 19 | |
| 12 | |
| 11 |