Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help with percentage of group Post Reply Post New Topic
Author Message
j_ellemore
Newbie
Newbie


Joined: 31 May 2009
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote j_ellemore Replybullet Topic: Help with percentage of group
     Posted: 23 Nov 2009 at 8:15am
Hi,
 
I'm trying to create a report which shows the number of incidents resolved by each analyst within SLA.
 
I have search all incidents and have a grand total. I then have a group for each analyst with a summary showing the total for each. There is a true/false filed in the database called SLAResolutionBreach. I want to show the percentage of False SLAResolutionBreach against the summary for each analyst.
 
I have tried various things but not getting anywhere. Suggestions would be greatly appreciated.
 
James
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Nov 2009 at 9:59am
IF you do not have duplciate data rows due to a join issue ...
Create a formula field to count the Falses as "FalseCount":
if table.SLAResolutionBreach=False then 1 else 0
Create a formula for your percentage
 
if Count(table.SLAResolutionBreach,Employeegroup)= 0 then 0 else
SUM(@FalseCount,Employeefgroup) % Count(table.SLAResolutionBreach,Employeegroup)
IP IP Logged
j_ellemore
Newbie
Newbie


Joined: 31 May 2009
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote j_ellemore Replybullet Posted: 24 Nov 2009 at 5:21am
Hi, Thanks i've tried this but am doing something incorrectly. I set-up FalseCount with if table.SLAResolutionBreach=False then 1 else 0 and it just returns 1.00 for each analyst.
Where do I enter:
if Count(table.SLAResolutionBreach,Employeegroup)= 0 then 0 else
SUM(@FalseCount,Employeefgroup) % Count(table.SLAResolutionBreach,Employeegroup) ? In a new formula or in falscount?
I tried creating it in false count and just got an error? Also what should I use for the EmployeeGroup? This is what I attempted:
 
if {Incident.SLAResolutionBreach}=False then 1 else 0
if Count {Incident.SLAResolutionBreach},Count ({Incident.CreatedDateTime}, {Incident.resolved_by}))= 0 then 0 else
SUM(@FalseCount,Count ({Incident.CreatedDateTime}, {Incident.resolved_by})) % Count{Incident.SLAResolutionBreach},Count ({Incident.CreatedDateTime}, {Incident.resolved_by}))
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Nov 2009 at 6:59am

If you place the "FalseCount" on the detail section it should return a 1 whenver that row is false and a 0 when it is not. If that is not working the rest of the process won't either.

The rest of it is using two Summaries to get your percentage. a SUM / COUNT. We can add the if-then to handle the division by 0 error later.
 
The Employee Group should have been called AnalystGroup. When you Summarize data at a group level you have to indicate which group by using the field you grouped on as the second condition for the summary...aggregate function(field tosummarize, group field)...
I don't know what you grouped your analyst on, an ID#, a name or something else.
So I want to get a SUM of the FalseCount per analyst divided by the COUNT of all records per analyst.
Create a new formula as "Analyst%":
SUM({@FalseCount, analystgroupedfield) % COUNT({Incident.SLAResolutionBreach,analystgroupedfield)
Place this on the Analyst Group footer
 
IP IP Logged
j_ellemore
Newbie
Newbie


Joined: 31 May 2009
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote j_ellemore Replybullet Posted: 24 Nov 2009 at 8:51am
Superb, thank you so much! I don't know what I would do without this forum and the helpful people on it!
Smile


Edited by j_ellemore - 24 Nov 2009 at 9:15am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum