Skip to Content
0
Former Member
Apr 21, 2009 at 07:14 PM

find average at group level of multiple grouped fields

25 Views

Can this not be done in Crystal

I am trying to total and average at the group level like this:

((Sum ({@Unscheduled}, {@monthName}))/(Sum ({@total}, {@monthName}))*100)

-- {@Unscheduled} = if ({Table_Name.status} = "Unscheduled" and not({Table_Name.StartDate}>= currentdate))

then 1

I am grouping by month. The formula {@Unscheduled} gave me the total for each month of that ticket type and I was able to sum 3 other ticket types and sum total of all ticket types. But when I try to find the average of each with this

((Sum ({@Unscheduled}, {@monthName}))/(Sum ({@total}, {@monthName}))*100)

I get an error saying division canu2019t be done with zero, but there are no zeros when shown separately on the report.

I guess my question is Can you not perform calculations at the group level with multiple fields.

Any insight would be appreciated and I apologize if this is somewhat incoherent.