Skip to main content

Hello Trailblazers,

 

I am looking to create a formula field that I can add to my opportunity compact layout. This will show the number of days since the opp was created. This is the formula I am using.

 

TODAY() - DATEVALUE(CreatedDate)

 

This seems to work if the opportunity is open. If the opportunity is closed I would want want to return a blank.

 

Can I tweak this formula to say If the opp stage is closed then nothing, otherwise do the calculation above?

 

Thanks Trailblazers

4 Antworten
  1. 7. Sept. 2023, 09:22

    IF(StageName != 'Closed', TODAY() - DATEVALUE(CreatedDate), '')

     

    OTHERWISE, try this 

     

    IF(

        ISPICKVAL(StageName, "Closed"), 

        NULL,

        TODAY() - DATEVALUE(CreatedDate)

    )

     

    Mark my answer as the best answer if helpful/or working