Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
MAJackson
Frequent Visitor

Dynamic End Date for Calendar Table

Hello,

 

I am using a calendar table and would like to make the end date to be current year plus 1.  I am using the following formula in the query editor: =Date.EndOfYear(DateTime.Date(DateTime.FixedLocalNow())).  This is giving me the end date for the current year.  I would like the end date for the next calendar year.  How can I adjust this formula to give me that result.

 

Thanks for your help!

Example.png

 

 

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Date.AddYears(Date.EndOfYear(DateTime.Date(DateTime.FixedLocalNow())),1)

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

4 REPLIES 4
JarroVGIT
Resident Rockstar
Resident Rockstar

Something like this?

=DateTime.Date(#datetime(Date.Year(DateTime.FixedLocalNow())+1, 12,31)

Usually I create my data tables in DAX, not PowerQuery but this might be what you are looking for 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




mwegener
Most Valuable Professional
Most Valuable Professional

Date.AddYears(Date.EndOfYear(DateTime.Date(DateTime.FixedLocalNow())),1)

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Thank you!  This works perfectly.  I can also adjust the number of years if needed.  I was hving trouble figuring out where to put the number of years, I kept adding "+1" instead of just the "1".

lbudack
Advocate III
Advocate III

I've found this method for creating a calendar table to be more flexible. A little bit longer to set up, but it can probably help you here. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors