Is the below sum function valid in it's syntax? I am trying to subtract the requested date from the closed date and then sum the results. I am not getting an error, but the results are all zero, which is definately incorrect.
-Sum(Format(closed_dt,"yyy
ymm")=[For
ms]![frmRS
S_TtlsByFr
q]![cmbYea
rMonth] - Format(requested_dt,"yyyym
m")=[Forms
]![frmRSS_
TtlsByFrq]
![cmbYearM
onth]) AS TurnAroundTime
If I run the below query, it works and returns exactly the correct results.
SELECT
request_dept_nm,
sum(DateDiff("d", requested_dt, closed_dt)) As DaysDifference
FROM request_fact
WHERE
request_dept_nm="Informati
on Delivery - Sales, Marketing, UW" AND
Format(closed_dt,"yyyymm")
=[Forms]![
frmRSS_Ttl
sByFrq]![c
mbYearMont
h] AND
Format(requested_dt,"yyyym
m")=[Forms
]![frmRSS_
TtlsByFrq]
![cmbYearM
onth]
GROUP BY request_dept_nm
Start Free Trial