Forum Discussion
DYY94
Helper I
3 years agoSubtract a date with number
Hello Comuunity, I want to do this calculation : - For exemple: [Maturite] - [MR/365] : 24/11/2025 - 3 Expected Output : So i have created new table calle...
Anonymous
3 years agoNot applicable
Hi DYY94 ,
Please try this:
Measure =
VAR _date = MAX('Output'[Maturite])
VAR _result = DATE(YEAR(_date)+[MR/365],MONTH(_date),DAY(_date))
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
DYY94
Helper I
3 years agoHi Anonymous ,
Thanks for your reply !
Your code works fine but not the Output i wanted.
I want to give the range of dates like this:
24/11/2025 - 3 :
24/11/2025 => 24/11/2022
24/11/2025 => 24/11/2023
24/11/2025 => 24/11/2023
Thanks.