Forum Discussion
amiller5
4 years agoHelper II
Date diff with an if statement?
Hello - I am trying to create a Turn around time calculation using a date for opened and closed. When the file has nothing in the date closed column, I want the calculation to be against another da...
- 4 years ago
amiller5 try this:
Number of Months = DATEDIFF( 'Table'[Open Date Column], COALESCE ( 'Table'[Closed Date Column], CALCULATE ( MAX ( 'Key Date Table'[Key Date Column] ) ), MONTH )✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
parry2k
4 years agoSuper User
amiller5 try this:
Number of Months =
DATEDIFF(
'Table'[Open Date Column],
COALESCE (
'Table'[Closed Date Column],
CALCULATE ( MAX ( 'Key Date Table'[Key Date Column] )
),
MONTH
)
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!