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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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