Forum Discussion

Philecowan's avatar
Philecowan
Copper Contributor
Dec 13, 2022

Conditional formatting a column

Hi there….I am relatively new to Sharepoint.

 

I have a column for ‘date completed’ and a column for ‘time to complete’.  The ‘time to complete’ column subtracts the ‘date completed’  from the ‘date of entry’ column to give a number of days.  When the ‘date completed’ column has an entry it works fine.  When it is blank, it returns a default value of -44,908 which looks clumsy.  Is there a simple Json code to make this value font white so it doesn’t show up.

 

All help appreciated.

 

Cheers. Phil

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    Philecowan you don't need JSON for this, just get the formula on the Time to Complete calculated column to check if the Date Completed column is blank. If it is then display nothing, otherwise calculate the difference in days.

     

    =IF(ISBLANK([Date Completed]),"",DATEDIF([Date of Entry],[Date Completed],"D"))

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Resources