A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Dear Bharathi,
Sorry for the late reply.
Based on my understanding, if some values missing such as Approval Date or Completion Date or only some values exist and miss another between Query Raised Date or Query Resolved Date, the calculation will be failed as there will be no age in calculation. In that situation, you may change it to No Age based on the original formula =DATEDIF([Approval Date],[Completion Date],"d")-DATEDIF([Query Raised Date],[QueryResolved Date ],"d") you use.
You may use the following formula to make the calculated column work.
Calculated Column: Age Calculate
Formula: =IF(OR(ApprovalDate=0,CompletionDate=0),"No Age",IF(AND(QueryRaisedDate=0,QueryResolvedDate=0),DATEDIF(ApprovalDate,CompletionDate,"d")-DATEDIF(QueryRaisedDate,QueryResolvedDate,"d"),IF(AND(AND(ApprovalDate<>0,CompletionDate<>0),AND(QueryRaisedDate<>0,QueryResolvedDate<>0)),DATEDIF(ApprovalDate,CompletionDate,"d")-DATEDIF(QueryRaisedDate,QueryResolvedDate,"d"),"No Age")))
Result:
If something is misunderstood, welcome to post your updates at your convenience and let us confirm the actual requirement in your environment.
Thanks for your effort and time!
Sincerely,
Cliff | Microsoft Community Moderator