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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
mgobble
Regular Visitor

DateAdd function not adding years

I am taking a date in column A and adding 2 years in column B. However, many of the cells are not producing a date. I have tried numerous formulas with little to no success. Why is this happening.

I have tried:

Column B=DateAdd('Table'[column A],2,year)

This will calculate some but not all.

I have tried:

Column B='Table'[column A]+750

This calculates 750 days (365 x 2) and all cells show a date, but i'm looking for exactly 2 years, not 750 days

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @mgobble 

 

Could it be that [Column A] does not have a valid date?





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

Proud to be a Super User!







Power BI Blog

Unfortunately, all cells that contain a date are formatted the same. As I said the formula will work if I add 730 days it works fine, but when I try and add years, the formula does not populate in all the cells. 

Hi @mgobble 

 

Why not just add the dates in Power Query?


I would recommend it this way, it enables better compression. And also it is a lot easier to do this in Power Query?





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

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.