Forum Discussion
Steven_Wu
3 years agoFrequent Visitor
How to convert the integer into date for calculation?
Hi, All,
I got a table as follow:
| Date | Year Period | Result |
| 2011-9-6 | 5 | 2016-9-6 |
| 2012-6-3 | 4 | 2016-6-3 |
| 2003-4-5 | 5 | 2008-4-5 |
Is there any way to add the Year Period(Integer) to the date for getting the Result column?
Because the table is generated in DAX, so I cannot use the Power Query for date calculation.
Hope to deal with this case with DAX.
Thank you~
Hello,
You can do it this way:
Result = DATE(YEAR('Table'[Date])+'Table'[Year Period], MONTH('Table'[Date]), DAY('Table'[Date]))If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
2 Replies
- JoBIResolver II
Hello,
You can do it this way:
Result = DATE(YEAR('Table'[Date])+'Table'[Year Period], MONTH('Table'[Date]), DAY('Table'[Date]))If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
- Steven_WuFrequent Visitor
Thank you, JoBI~
It works~ Thank you so much~ 😀