Non-commutative summary field on several grouping levels of a Crystal XI report.

I have multiple formulas that need to be repeated on all grouping levels of my report. i.e.

SUM{OtherNumber}, {GroupField1}) / SUM({RowTotal}, {GroupField1})
SUM{OtherNumber}, {GroupField2}) / SUM({RowTotal}, {GroupField2})
SUM{OtherNumber}, {GroupField3}) / SUM({RowTotal}, {GroupField3})

The formulas are non-commutative, so in the past I've a separate formula field for each groupng level.  this is a maintenance nightmare when I have 5 grouping levels, and 4 different fourmulas.

When I insert a simple summary field to a report, I can simply copy it to the other group footer.header and it adjust to that grouping level as appropriate. Is there a way to replicate this with a custom summarization?..Something like have one formula where the group parameter can determine the grouping of the section the object is on and mimic that behavior?  That way I would only have to create one formula field for each calcualtion and place it on the various headers.

SUM{OtherNumber}, CurentGroupField()) / SUM({RowTotal}, CurentGroupField())
Who is Participating?
LinInDenverConnect With a Mentor Commented:
Depending on what you are doing, i have done this with Weighted Average with. This can not work properly if you have nulls or a lot of zeros, but it has been great for me with things like percents and averages like what you describe.

I believe what I did is the following (don't have good sample at my current gig to play with, so this is from memory).

A detail field would contain your numerator / denominator calculation. Drop it on the report.
Right Click on that field, Insert summary, and choose Weighted Average With.
This will open up another drop down box for you to select a field.
Choose your denominator field.

It might work for your calculations perfectly, but definitely test it first with a side by side comparison.
telcor739Author Commented:
thanks...that got the number of functions back to manageable levels.
All Courses

From novice to tech pro — start learning today.