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
Angela PetrignanoAngela Petrignano 

I have a field....

Hello,

I need help to create a field 'Total Cost Savings 2015'  (TCS15__c) that will display the sum of cost savings for every employee in my department in 2015

To keep track of relevant data, each person in the department is listed as a Contact under the Parent company and each contact record has a required currency field called 'Cost Savings' (API Name: Savings__c)

To easily filter our departmental employees in the contact record, there is also a 'Type' field in every contact record, and the value assigned to employees in our department is 'Administration' (API Name: Type__c)

So for example contact records typically look like this:

Company: ABC Widgets
Contact: Jack White
Type: Administration
Cost Saving: 45,000

Company: ABC Widgets
Contact: Jack Black
Type: Administration
Cost Saving: 55,000

Company: ABC Widgets
Contact: Jack Purple
Type: Administration
Cost Saving: 100,000

What we need to do is have a field-formula in the Contact Record (TCS15__c) that will 

(a) identify the contacts in the administration deartment based on the API Name (and exclude contacts from other dept's)

(b) pull the 3 figures: €45,000, €55,000 and €100,000 

(c) sum the 3 figures and display €200,000 in the read only 'Total Cost Savings 2015'  (TCS15__c) field

I hope I've been able to convey this correctly and I hope that someone will be able to help!

Thanks,
Angela
 

Himanshu ParasharHimanshu Parashar
Hi Angela,

If I am understood your requirement correctly you have TCS15__c in your Account object and you need total of Cost Saving for Administration department. if this is true then you can create a rollup summary field with Type="Administration", it will automatically put sum in TCS15__c as €200,000 in read only format.

Let me know if you have TCS15__c at any other object.

Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Angela PetrignanoAngela Petrignano
Hello Himanshu,

Thank you for taking the time to respond - my apologies for not having specified better but TCS15__c is actually in the contact object. 

 
Himanshu ParasharHimanshu Parashar
Hi Angela,

my apologies for being late here, You can create a formula field now on your contact object nad refer ther rollup summary field from Account object. :)

Here are summary of all steps.

1. Create a Rollup summary on Account object lets say Child_Cost_Saving__c and add Cost_Saving__c.
2. Create a formula Field on Contact or you can retype the TCS15__c as formula field and referr Child_Cost_Saving__c which will show you desired result in read only format.


Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
 
Rachel_NatikRachel_Natik
Just to understand, you want to have a field on each contact that refelects the TOTAL savings of ALL the contacts?
Im thinking that maybe if you explain why you need it, we can find another solution...
i.e. If its for reporting, you would be able to summarize that field, create a formula etc.