Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

groupinp and percentage average

Status
Not open for further replies.

gordabella25

Technical User
Jan 19, 2011
11
US
I'm new at using crystal reports and i'm trying to find out a simple way to do the following report that will group the category and give me a average for month and YTD and also average and percentage for both: MANY THANKS!

Categories: Circle, Square, Triangle

Category
Circle This Month YTD
Total Performed 5 57
Average Rating 100% 97%

Square This Month YTD
Total Performed 5 60
Passing Rating 100% 100%

Triangle This Month YTD
Total Performed 1 4
Passing Rating 50% 50%

this is the formula that i'm using but is not giving me the result i need:

if {Inspections_and_Tests.LU_InspectionCat~Description} = "Square" then
({Inspections_and_Tests.InspectionsTests~InspectionDate})In Date(Year(CurrentDate), Month(CurrentDate),1) To
DateAdd("m",1,Date(Year(CurrentDate), Month(CurrentDate),1)-1);
If {@sys.PossiblePoints}=0 then 0 else ({@sys.AwardedPoints}/{@sys.PossiblePoints})*100
 
Also how do you get the average of a sum?

I if Sum ({@sys.PossiblePoints}, {Inspections_and_Tests.InspectionsTests~InspectionNumber})=0 then 0 else
(Sum ({@sys.AwardedPoints}, {Inspections_and_Tests.InspectionsTests~InspectionNumber})/
Sum ({@sys.PossiblePoints}, {Inspections_and_Tests.InspectionsTests~InspectionNumber}))*100

I get the error that this can't be summarized
 
You should just insert a group on category. It looks like you are also grouping on inspection number--please explain why.

I think you should show a sample of your data at the detail level with clear labels of fields. Then show the summaries you expect to see.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top