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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.