function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Soo Kim 16Soo Kim 16 

how to get opportunity age from creation (Stage 1) and moves away from Stage 1

Hi,
I would like to create "Age" field to know how long opportunity sits from creation date until move away to Stage 1.
When a new opportunity is created, it auto defaults to Stage 1 then statge 2 or more...

Is this possible?

To start off, I will need to create a formula (Number) field and I started tto write this but don't think it will accomplish what I am achiving for. 

IF(IsClosed, CloseDate-DATEVALUE(CreatedDate), TODAY()-DATEVALUE(CreatedDate))

Best Answer chosen by Soo Kim 16
karthikeyan perumalkarthikeyan perumal
Hello Soo Kim16 

Try Below Code using formula field. that will calculate age of your Opp when the stage is Changed from '1' to others. 

if(Not(ISPICKVAL(StageFieldName, '1')), (TODAY() - DATEVALUE(CreatedDate)),0)

Hope it will help you. 

Thanks
karthik
 

All Answers

UC InnovationUC Innovation
Some questions. Does your opportunity default to stage 1? Does the close date get populated when you change from stage 1?
Soo Kim 16Soo Kim 16
Hi,
When an opportunity is created from a lead conversion, it auto defaults the opportunity stage to "1" and sets closed date to 53 days from creation date. 

Does this answer your question?
UC InnovationUC Innovation
so when is IsCLOSED true?
Soo Kim 16Soo Kim 16
I don't want to include Closed Won or closed Lost or Omitted.
As long as stage is move away from 1 to other than Closed Won or closed Lost or Omitted.
karthikeyan perumalkarthikeyan perumal
Hello Soo Kim16 

Try Below Code using formula field. that will calculate age of your Opp when the stage is Changed from '1' to others. 

if(Not(ISPICKVAL(StageFieldName, '1')), (TODAY() - DATEVALUE(CreatedDate)),0)

Hope it will help you. 

Thanks
karthik
 
This was selected as the best answer
GoJoyGoJoy
karthikeyan,
thank you so much for your help