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
ApolloSApolloS 

How do I write a condition that shows only the first "Closed Won" opportunity for the Account?

What I am trying to accomplish (given all the SF EE and my skill limitations) is to pull up in a formula field for Account total Amount of only the 1st Closed Won opportunity associated with that account. It basically will tell sales folks (and provide data for reports) that shows how much customers usually spend the first time they buy.

 

So how do I write a condition that shows only the first "Closed Won" opportunity for the Account?

rushrush

Use the roll up summary field with a filter.

ApolloSApolloS

I've tried several solution. The issue with putting the filter together is there is no way (at least everything I have tried so far) to pull up ONLY just the 1st Opportunity with Closed Won. I can pull all Closed Won, but I can't figure out how to limit it to only the oldest one.

rushrush

 

Ahh..... yes.....

 

Well in that case I could suggest trying one other trick...... not sure if will work.... let me know if it does....

 

1 - Put a roll up summary on the account record that simply counts the number of opportunities. 

 

2 - Put a formula field on the Opportunity object that equals the previously created roll up summary on the parent account

 

3 - Create a field on the Opportunity object (leave it hidden from layouts and most people) that is a currency field

 

4 - Create a workflow field update that triggers on the opportunity record in the case that an opp is closed won, and if the field created in step 2 = 1, that updates the currency field with the value of that opportunity.

 

5 - Use another roll up on the account that simply summarizes this field...... only the first closed/won opp should have a value in it.

 

 

caveats - you will need to do some checking on when to clear it out (for instance you will need to undo the value at times if an opportunity is removed or taken out of closed/won......

 

Not sure if that can be done well enough to serve your purposes, but worth a shot....

ApolloSApolloS

It would work for all new business (Account with no previous Opportunity as Closed Won), but the problem is I have about 400+ Accounts and 800+ closed won opportunities. Looks like I would have to spend several days just going through the accounts and marking Opportunities as first one.

rushrush

Nope....

 

How good are you at excel? 

 

Export all of the opps and their ids, amounts, and closed dates and stages (or just export the closed/wons)......

 

You can use formulas in excel to identify and update previous 'first ones'.

ApolloSApolloS

I've got someone really good here with Excel. Where I am extra squeemish is with dumping data back in from excel. 

No one here ever has done mass updates with Excel.

rushrush

 

Use data loader...... just update that one currency field.