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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tob_P
Helper V
Helper V

Date.AddYears based on interval in another column

Hi,

 

Related this Solved: Re: DATEADD issue - Microsoft Fabric Community

 

I'm looking for some help on a custom column in query editor. I would like to calculate a future date, based on my original date column, X number of years in the future based in an interval column. Example data and expected format below. If 0 is in the interval column, then there should be no future date output

 

Start DateIntervalExpected End Date
01/05/20230 
25/06/2022425/06/2026
04/10/2022204/10/2024
19/06/2021119/02/2022
15/10/2020415/10/2024
04/07/2022504/07/2027
21/07/20210 
1 ACCEPTED SOLUTION
slorin
Super User
Super User

Hi,

Add a new column

if [Interval]>0 then Date.AddYears([Start Date],[Interval]) else null

 Stéphane

View solution in original post

2 REPLIES 2
Tob_P
Helper V
Helper V

@slorin 

Much appreciated!

slorin
Super User
Super User

Hi,

Add a new column

if [Interval]>0 then Date.AddYears([Start Date],[Interval]) else null

 Stéphane

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors