SOLVED

Calculated value for difference between two dates, with IF qualifier

Copper Contributor

Calculated value for difference between two dates, with IF qualifier

Hi all,

First time user of the forum and not a Lists expert, so please forgive any errors. See screenshot for example. I have a column in a list that calculates the value between two dates to give the number of days a task was open. However, users only input the second date when they close the task, and tasks are often open for many days/weeks. As a result, the simple formula I have used -

[Task Closed]-[Date Received ] - is giving a minus amount for days open which makes reporting difficult.

I have a solution in mind but cannot find the suitable formula. Does anyone know of one, or have any other suggestions? Solution idea is:

- Include an 'IF' qualifier so that the column only populates if 'Task Closed' has been completed.

Thanks, Meg

3 Replies
best response confirmed by MeganTPT (Copper Contributor)
Solution

Re: Calculated value for difference between two dates, with IF qualifier

@MeganTPT You could use a formula like

=IF(ISBLANK(End),"",(DATEDIF(Start,End,"D")))

which results in:

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

Re: Calculated value for difference between two dates, with IF qualifier

Thanks Rob- that solved it. Really appreciate your help.

Re: Calculated value for difference between two dates, with IF qualifier

Achintha hetti archinilage
1 best response

Accepted Solutions
best response confirmed by MeganTPT (Copper Contributor)
Solution

Re: Calculated value for difference between two dates, with IF qualifier

@MeganTPT You could use a formula like

=IF(ISBLANK(End),"",(DATEDIF(Start,End,"D")))

which results in:

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)