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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

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.