SharePoint Calculated Column Error based on Dates and Blank Fields

Matthew Dohm 21 Reputation points
2021-02-26T16:50:29.77+00:00

I am putting together a schedule tracker using an SP List.
This list includes a handful of fields for various content, of which are:
[Audit Target Date] (Date/Time Column)
[Acutual Audit Date] (Date/Time Column)
[On Time] (Calculated Column)

Currently just to make the field populate I have this entered in the formula of the calculated column: IF([Audit Target Date]<=[Actual Audit Date],"YES","NO")

However, the [Actual Audit Date] will be blank until the activity is performed and the date is specified in that field. This is not too much of an issue, except the [On Time] field indicates "N,O, which is going to inflate values in a PowerBI report.

I have tried multiple times to generate an IF Formula that returns a "N/A" text when the [Actual Audit Date] is blank, but when a date is specified in that field it returns the proper designation of "Yes" or "No."

Don't laugh, as I am a newbie, but these are a couple I have tried with no luck at all:
=IF(ISBLANK[Actual Audit Date],"N/A",IF([Audit Target Date]<=[Actual Audit Date],"YES","NO")
=IF([Actual Audit Date]=ISBLANK,"N/A",IF([Audit Target Date]<=[Actual Audit Date],"YES","NO"))

I'm sure there's something small that I am overlooking or an incorrect argument sequence I am using that I will be facepalming about shortly...

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Elsie Lu_MSFT 9,801 Reputation points
    2021-03-01T06:23:56.25+00:00

    Hi @Matthew Dohm ,

    Actually you are right, however you forgot to add parentheses, it should be: ISBLANK([Actual Audit Date]).

    =IF(ISBLANK([Actual Audit Date]),"N/A",IF([Audit Target Date]>=[Actual Audit Date],"YES","NO"))  
    

    Test Result:
    72855-1.jpg
    List:
    72854-capture.jpg

    In addition, please remember to check the logic according to actual needs to ensure the results.

    Feel free to reply if you need any assistance. :)


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.