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
Hi
I hope you can help.
I am trying to create a dynamic date table. Part of it is defining a start and end year. To have a dynamic start and end year I am trying this code, which gets me the date, but I want to extract the year only.
This code gets me the date.
FromYear = Date.AddYears(Date.From(DateTime.LocalNow()), -3),
I think I have to use the Year.From function, but I have tried a few varicances, but I don't get the result I want.
Can you experst help?
Thanks
Joe
Solved! Go to Solution.
its always the way after posting. I have my solution
DateTo = Date.Year(DateTime.LocalNow()) +6
its always the way after posting. I have my solution
DateTo = Date.Year(DateTime.LocalNow()) +6
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |