Forum Discussion
bhmiller89
10 years agoHelper V
DATEDIFF
I keep getting errors with Date Diff. I need to find hours difference between Open Date and Resolved Date. Each item does not have a Resolve Date, so I tried "Resolution Time= IF('table'[Res...
- 10 years ago
bhmiller89 Try this formula as a column...
Resolution Time Column = IF ( ISBLANK ( 'Table'[Resolved Date] ), 0, IF ( 'Table'[Resolved Date] < 'Table'[Open Date], -1 * DATEDIFF ( 'Table'[Resolved Date], 'Table'[Open Date], HOUR ), DATEDIFF ( 'Table'[Open Date], 'Table'[Resolved Date], HOUR ) ) )If this works you have some resolved dates that are prior to their respective open date.
Those will appear as negative numbers in the resolution column because of the * -1.
Hope this resolves the errors! :smileyhappy:
Sean
10 years agoCommunity Champion
bhmiller89 Try this formula as a column...
Resolution Time Column =
IF (
ISBLANK ( 'Table'[Resolved Date] ),
0,
IF (
'Table'[Resolved Date] < 'Table'[Open Date],
-1 * DATEDIFF ( 'Table'[Resolved Date], 'Table'[Open Date], HOUR ),
DATEDIFF ( 'Table'[Open Date], 'Table'[Resolved Date], HOUR )
)
)If this works you have some resolved dates that are prior to their respective open date.
Those will appear as negative numbers in the resolution column because of the * -1.
Hope this resolves the errors! :smileyhappy: