Share via

Aging Calculation

Anonymous
2022-11-28T17:16:02+00:00

Hi, I am trying to calculate Aging a item in sharepoint. there will be four columns such as [Approval Date], [Completion Date], [Query Raised Date] and [Query Resolved Date]. So the system should compare date total aging of instructions from Approval Date to Completion Date and exclude the Query Period (if Any Raised).

=DATEDIF([Approval Date],[Completion Date],"d")-DATEDIF([Query Raised Date],[QueryResolved Date ],"d"), this is the formula i used but this is throwing #NUM! error if any of the value is missing.

completion date may not be available for all the items and query fileds will be updated only if required and will be left blank.

can someone help me in getting the issue resolved!

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2022-11-30T07:41:02+00:00

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

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-12-02T13:03:18+00:00

    That Resolved the issue, thanks a ton!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-11-29T09:30:08+00:00

    Dear Bharathi,

    Welcome to the forum here.

    I may need some time to do a test and I'll update here as soon as possible.

    Thanks for your effort and time!

    Sincerely,

    Cliff | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments