Forum Discussion
DaxTest11 = DATEDIFF('table'[Date/Time Opened],'table'[First Response],MINUTE) returns odd results
- Anonymous4 years ago
Try this:
My Time to Respond =
VAR StartHour = HOUR(SRInsights-SupportCases'[Date/Time Opened]) VAR EndHour = HOUR(SRInsights-SupportCases'[First Response Date]) RETURN
IF (StartHour > 18 && EndHour < 8, [Whatever formula you need when after 6PM && before 8AM],
(((DATEDIFF('SRInsights-SupportCases'[Date/Time Opened], 'SRInsights-SupportCases'[First Response Date], MINUTE))))
--Nate
That's weird. I can't reproduce the 2874 value you describe.
- kmcardle4 years ago
Helper I
I may have found the issue. I recreated the same info using a New Measure rather than a New Column and Am now getting a correct answer from the rows I have double-checked. Here is the Formula I use:
My Time to Respond = (((DATEDIFF('SRInsights-SupportCases'[Date/Time Opened], 'SRInsights-SupportCases'[First Response Date], MINUTE))))
Now I am wondering how I can create a measure from the table that would allow me to Test whether the Open Time is After 6pm and the Resolution Time is After 8am.
Any ideas??