Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
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
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |