Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 Date | Interval | Expected End Date |
| 01/05/2023 | 0 | |
| 25/06/2022 | 4 | 25/06/2026 |
| 04/10/2022 | 2 | 04/10/2024 |
| 19/06/2021 | 1 | 19/02/2022 |
| 15/10/2020 | 4 | 15/10/2024 |
| 04/07/2022 | 5 | 04/07/2027 |
| 21/07/2021 | 0 |
Solved! Go to Solution.
Hi,
Add a new column
if [Interval]>0 then Date.AddYears([Start Date],[Interval]) else null
Stéphane
Hi,
Add a new column
if [Interval]>0 then Date.AddYears([Start Date],[Interval]) else null
Stéphane
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |