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...
Mahesh0016
Super User
3 years agoSubtract a date = CALCULATE(MAX('Date'[Date]),DATEADD('Date'[Date],-2,YEAR))
Hello DYY94 ,
I hope above formula helpful for you ...... if it is useful for you kindly accept as solution mark .
Hello DYY94 ,
I hope above formula helpful for you ...... if it is useful for you kindly accept as solution mark .
thank you!
DYY94
Helper I
3 years agoHi Mahesh0016 ,
Thanks for your help.
I just used your code. it's not the output i wanted. it gave me always the same date or it should gave me the other dates.
This is the output with your code :
Expected output :
Thanks.
- Mahesh00163 years ago
Super User
you should Use same date column in max and Dateadd function.
- DYY943 years ago
Helper I
yes I just did that but it didn't work either.
- If you want you can test it with the simple file i shared.
https://drive.google.com/file/d/1Y2eAmjcVyWDJozOTxEaNFXh3F9ZeNpmu/view?usp=sharing
- Mahesh00163 years ago
Super User
Please share only PBI file cant find out your pbi file so.....