Forum Discussion
DAX from Excel
In excel, I can add years to a date to determine at futre date, for example, what is the date 27 years from 09/11/2011
this gives me 9/11/2038, and I can apply this simple =DATE across a range of dates that I have.
| =DATE(YEAR(A2) + 27, MONTH(A2), DAY(A2)) |
I have not been able to determine how to do this in DAX for my power bi report.
Any help would be appreciated.
Thank you
MC
You can use the dateadd function which would be something like
Date + 27 days = dateadd(Table[Date],27, day)Hi Lex23,
You may be looking for EDATE. The unit of measure is months though so in your example, you would use 27*12.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
2 Replies
- SykResident Rockstar
You can use the dateadd function which would be something like
Date + 27 days = dateadd(Table[Date],27, day) - Wilson_Memorable Member
Hi Lex23,
You may be looking for EDATE. The unit of measure is months though so in your example, you would use 27*12.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)