Thursday, March 29, 2012

Formula Help

I have a report that I need to take the average of a total(s)...
For example
I have a field that is a sum of units(number) and then I have a field that is a count of payments(number). I need to average these two fields,so that I have the average # of payments?How can I do this?I would try creating a new formula and expand the "REPORT FIELDS" in the tree within the formula editor (2nd one from left) and pull the applicable summary fields in. I'm not positive that would work as I haven't tried it before.|||I've tried that but it gives me an error of

The Summary/Running Total field cannot be created.|||I just tested it in a report I have and it worked just fine. Where are you trying to use it? You will not be able to use it in the details, but it would have to fall in the same group footer as the summary.|||These calculations are in the group footer. I need to average the grand totals.

What formula are you using? These are the two fields that I need to use

(Sum ({CLCHARGE.CUNITS}, {CLPAYMNT.COMPANY}) and
Count({CLPAYMNT.CHGID},{CLPAYMNT.COMPANY})|||Sorry I didn't ask this in the previous post, but what version of CR are you using? I am on 10, so if you are earlier, maybe it doesn't support those calculations in the same way it does for me. If you are 10 or XI, then I would need to ask - did you create formulas for the summaries or did you use the INSERT / SUMMARY from the menu bar? If you created the summaries by letting CR do it via the INSERT / SUMMARY, then you create a separate formula that drags those summaries in to the formula editor (typing a "/" between them), it should work.|||I am using 8.5|||It may be that you can't do it from 8.5. I'm sorry that I couldn't help you.|||I was afraid of that...Thanks for you help anyway.|||Hi there I have an average formula setup in one of my reports using CR 8.5.

whileprintingrecords;

numbervar TotalTsec;
local numbervar AverageFix:=TotalTsec/DistinctCount ({SW_CASE.swCaseId});
numbervar LenOfDay;

Hope this points you in the right direction !

Many Thanks

No comments:

Post a Comment