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
JoshSutterfieldJoshSutterfield 

Custom Summary Field - Weighted Total

Can one create a simple weighted total in a custom summary field? 
 
I can insert "Annual Sales" as a part of a custom summary field -- it automatically attaches a summary funciton.
ANNUAL_REVENUE:SUM
 
Am I to assume that nothing can be done record-by-record?  How about a really simple weighted sum, counting companies making over $1M?
 
IF(ANNUAL_REVENUE>1000000,1,0)
Error: Field LEAD.ANNUAL_REVENUE does not exist. Check spelling.

Whether I use one of the few fields available or try to use another field from the record (if I can figure out its secret name) it "does not exist".  The only thing that seems to work is arithmetic upon pre-summarized (min/max/sum/avg) fields. 
 
In other words one can do a calculation on a few summarized fields, but one cannot do a summary on a few calculations. 
 
I just want to weight my leads!  I want to count them 0.5 if they have an Inbound Lead_Source and 1.5 for anything else.  What less could you want in custom summary formulas?
 
HenkHofmansHenkHofmans
Josh,
I am a SF (admin) user since early this year (2007). Where I find the custom formula fields in SF records very powerful, I also find the SF custom summary formulas in reports much less useful. As the name implies they work on summaries (ie subtotals and totals) and not on individual records.

The work-around for you seems to be to calculate the values you want inside the opportunity record in custom fields and then apply a summary formula in your report (on the opportunity custom fields). I really consider this a work-around as such approach creates additional fields in your SF records which should not be necessary.

I have seen other discussions around similar topics, which can be summarised in a requirement to have 'ad hoc' custom fields in reports, ie fields to calculate something on a record-by-record basis, and which ad-hoc fields themselves should be able to get summarised.

When starting to use custom summary formulas myself, reading the SF documentation, I initially thought the formulas would be applied PRIOR to being summarised. The following example from the SF User Guide (version summar 2007) on page 279 does imply this:

% Difference between Cost and Sales Price
(TOTAL_PRICE:SUM - QUANTITY:SUM *
Product2.Cost__c:SUM) / (QUANTITY:SUM *
Product2.Cost__c:SUM)

Any formula with multiplication of "quantity field * amount field" makes little sense when first adding all quantities and then adding all amounts, multiplying the result. I therefor fear that the above example from the SF guide does not work.

Hope the work around is some relief for you. In general I am looking forward to see other reactions on this topic, as today the custom summary formulas seem only viable with very simple operators, e.g. 'amount:sum - cost:sum', where more advanced formulas really require these 'ad-hoc' custom fields (record by record).

Regards,
Henk