chainedtodesk
Programmer
i am trying to execute the following "IIF" statement but get errors, i have a calc to figure out number of days a ticket is open. then there is a ct field that i need to add to that, but sometimes there isnt a ct and its null, so i thought i should be able to add the iff statement that if the CT is null then just use the days calc otherwise add the two together, which is what the original field in the query did except it dropped data where CT was null... i have tried this over and over and get the error about trying to execute a query that doesnt include........ and so on.
thanks
NewTotal: IIf(Avg([Warranty Shipment CT]) Is Null,Avg(DateDiff("d",DateValue([StartedToNew].[ChangedDateTime]),DateValue([NewToAuth].[ChangedDateTime]))),Avg(DateDiff("d",DateValue([StartedToNew].[ChangedDateTime]),DateValue([NewToAuth].[ChangedDateTime]))+Avg([Warranty Shipment CT])))
thanks
NewTotal: IIf(Avg([Warranty Shipment CT]) Is Null,Avg(DateDiff("d",DateValue([StartedToNew].[ChangedDateTime]),DateValue([NewToAuth].[ChangedDateTime]))),Avg(DateDiff("d",DateValue([StartedToNew].[ChangedDateTime]),DateValue([NewToAuth].[ChangedDateTime]))+Avg([Warranty Shipment CT])))