How to subtract days from a date using Date.AddDays?

Beni2021 1 Reputation point


I am using Date.AddDays in mquery and I am receiving errors in some rows. I want to find a date of birth from the "File_Date" column minus the "Age" column. Anyone know what the problem is? Thank you!

= Table.AddColumn(#"Added Custom", "DOB", each Date.AddDays([File_Date], -([Age]*365.25)))

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
34,830 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ehren (MSFT) 1,781 Reputation points Microsoft Employee

    Try using Date.AddYears instead.

    0 comments No comments