Forum Discussion

ElvirBotic's avatar
ElvirBotic
Icon for Helper III rankHelper III
3 years ago
Solved

Add Years to Date

Hello, I have a table with two columns. Column A is a Install Date and Column B is the life expectancy of that asset. Life expectancy is always X amount of years. I want to take the date an asset was installed and calculate the replacement date using those two columns. 

 

I have tried using the DATEADD expression, but that only allowed me to do a fixed amount of years. SInce each asset has its own life expectancy I had no success simply adding to that install date in a calculated column. Any help or tips would be appreciated. 

 

Example:

Install DateLife Expectancy (Years)Replacement Date
10/11/2022        510/11/2027
8/24/2021       1508/24/2036
09/20/2018        709/20/2025
  • Hi, ElvirBotic ;

    You could also try .

    Replacement Date2 = EDATE([Install Date],[Life Expectancy (Years)]*12)

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, ElvirBotic ;

    You could also try .

    Replacement Date2 = EDATE([Install Date],[Life Expectancy (Years)]*12)

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi,

    you can try this calculated column

    Replacement Date = Date(YEAR('Table'[Install Date])+'Table'[Life Expectancy (Years)],MONTH('Table'[Install Date]),day('Table'[Install Date]))
    and obtain

    If this post is useful to help you to solve your issue consider giving the post a thumbs up 

     and accepting it as a solution !