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
sfdc2705sfdc2705 

Formula field for total

I have 2 formula fields with the formulas like this.

 

1  IF (xxx  == 'US' &&  Text(yyy) =='Yes',1,0)

2 IF (xxx <> 'US' &&  Text(yyy) =='Yes',1,0)

 

Now i have created a third field which should sum the total of these two fields 1 &2 where the values are 1 in both fields.

If Field have 9 contacts where the value is 1  for field 1 and 2 contacts whethe the value is 1 for field 2 then the field 3 should return the number 11 as total..

 

Can Anybody please send the formula for my specific purpose.

Let me know if you need any further details.

 

Thanks

 

Starz26Starz26

It sounds like you are trying to do a summary of children on the parent.

 

Without writing code, you would have to create 2 roll up summaries, one for each formula field on the child. Then create a third field to sum the two roll ups.

 

I believe the only  other way is to write a trigger on the children to update the parent.

sfdc2705sfdc2705

what i wanted to achieve is to create a report which will give the no of contacts domestic vs international filtered by 2 fields on the contact and representing the totals of these domestic and international contacts on the report.

 

For this i have written those 2 formulas and wanted to write a formula to represent the total of those two..

 

Thanks in advance for ur help..

Starz26Starz26

the only way to do it in a report is to create a summary report, then group by a unique value, then create a formula field to add the two field together. This probably will not be ideal as you will have grouping for every single record and it would not be pretty to look at. also, the formula fields would not export

 

Formulas do not work at the individual record level, they only work from groupins or summary level.

 

If you want the value at the record level, my initial suggestion would be the only way to go I believe. Then you could have the value on each record in the tabular report