0

I have a summary report, I am trying to get the weighted average using formula. The formula should be, if the

IF(Survey_Results__c.PG_Relationship_with_IS__c=
"Slightly", 1*RowCount, 0),
IF(Survey_Results__c.PG_Relationship_with_IS__c=
"Moderately", 2*RowCount, 0),
IF(Survey_Results__c.PG_Relationship_with_IS__c=
"Significantly", 3*RowCount, 0),
IF(Survey_Results__c.PG_Relationship_with_IS__c=
"Very significantly", 4*RowCount, 0)

enter image description here

If you see the report, I am getting 0, if I use any one of the formula.

  1. Can you please help me how to make this work?
  2. How we can check multiple values in one formula?

enter image description here

  • Try to make a formula field like CASE(PG_Relationship_with_IS__c, 'Slightly', 1, 'Moderately', 2, 'Significantly', 3, 'Very significantly', 4, 0) and then try something like Survey_Results__c.My_Weight_Formula__c:MIN * RowCount – o-lexi Oct 11 '16 at 22:41
  • hi@Oleksiy, I am getting this error. "Error: Invalid custom summary formula definition: Incorrect parameter type for function 'CASE()'. Expected Object, received Text." – Ajay Oct 12 '16 at 0:01
  • @Oleksiy, Thanks. It worked. I forgot to create a formula field earlier. – Ajay Oct 12 '16 at 0:15
  • @Oleksiy, Is there a way I can get Grand Total of weight? I am getting as zero. and Also I need to write formula: Grand Total/Grand Weight. How can I achieve this? – Ajay Oct 12 '16 at 0:56
  • It might be possible somehow, but I'd give it a small chance figuring this out. Salesforce just isn't capable to do such calculations (( – o-lexi Oct 12 '16 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.