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
Srikanth Challa 3Srikanth Challa 3 

How to create formulas in reports

Can we create a formula to calculate Count(Warranty status='Active')/Count(Warranty status='Active')+ount(Warranty status='Inactive') in reports?
Best Answer chosen by Srikanth Challa 3
Bhanu MaheshBhanu Mahesh
Hi Srikanth,

We can acheive this by using Custom Summary Formula available in reports.

But grouping should be there in the report to create Custom Summary Formula.

Check below links hoe to create Custom Summary Formula for your reference
https://success.salesforce.com/answers?id=90630000000h3gRAAQ
https://success.salesforce.com/answers?id=90630000000gqJVAAY

Regards,
Bhanu Mahesh

All Answers

Bhanu MaheshBhanu Mahesh
Hi Srikanth,

We can acheive this by using Custom Summary Formula available in reports.

But grouping should be there in the report to create Custom Summary Formula.

Check below links hoe to create Custom Summary Formula for your reference
https://success.salesforce.com/answers?id=90630000000h3gRAAQ
https://success.salesforce.com/answers?id=90630000000gqJVAAY

Regards,
Bhanu Mahesh
This was selected as the best answer
Srikanth Challa 3Srikanth Challa 3

Thanks Mahesh. I got it! We can add Custom Summary Formula for only Number fields. So I created 3 formula fields(ActiveContract, Expired Contract and Expired Warranty) with datatype Number which returns '1' in ActiveContract if the WarrantyStatus='Active' and '1' in Expired contract field if Status ='Expired Contract and '1' in Expired Warranty if Status='Expired Warranty' then i used the following formula in reports ObjectName.Active_Contract__c:SUM/(ObjectName.Active_Contract__c:SUM + ObjectName.Expired_Contract__c:SUM+ObjectName.Expired_warranty__c:SUM).