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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Average Call Per Hour Per Agent 1

Status
Not open for further replies.

iamtrying

Technical User
Sep 28, 2004
128
US
Hi,

I am developing a report with the fields:

Resource.resourceFirstname -->Agents Name
AgentConnectionDetail.startDateTime
AgentConnectionDetail.endDateTime

I have inserted a group on AgentConnectionDetail.startDateTime and selected "The section will be printed: for each hour which is returning the total calls for each hour.

How do I arrive with the average call per hour for each agent based on the total calls grouped on the startDateTime?

Thank you,
iamtrying
 
YOu may be able to do this with two Running Totals doing same as Vars below. If not build following VAR formulae.

Create two vars which are evaluated in Time group footer.
Add a group for Resource.resourceFirstname above time group

@Reset
//place this in agent group header
whileprintingrecords;

global numbervar CallCount:=0;
global numbervar HourCount:=0;


@AVgData
// in hour group footer
whileprintingrecords;

global numbervar CallCount;
global numbervar HourCount;

CallCount:= CallCount+count(resourceFirstname, startDateTime)
HourCount:= HourCount+1


@AVg
// In agent GF
whileprintingrecords;

global numbervar CallCount/global numbervar HourCount;

Ian

 
Ian,

Thanks for answering my post. I am receiving

the) is missing with resource highlighted.
when creating the formula:

CallCount:= CallCount+count(resourceFirstname, startDateTime)
HourCount:= HourCount+1

I have tried the full name
CallCount:= CallCount+count {Resource.resourceFirstName, AgentConnectionDetail.startDateTime)
HourCount:= HourCount+1

I cannot get pass this formula. Any suggestions?
 
I used short hand

YOu must also declare the vars as I suggested.

Try
CallCount:= CallCount+count({Resource.resourceFirstName}, {AgentConnectionDetail.startDateTime})
HourCount:= HourCount+1

The data in {} will be your fields full name. Clicking on the data explorer box in the formula editor will add these fields in correct format.

Ian
 
Okay, here is the complete formula:

whileprintingrecords;

global numbervar CallCount;
global numbervar HourCount;

CallCount:= CallCount+count({Resource.resourceFirstName}, {AgentConnectionDetail.startDateTime})

HourCount:= HourCount+1

Now, I am getting "The remaining text does not seem to be part of the formula". HourCount:= HourCount+1
 
You are missing a semicolon:

//@AVgData
// in hour group footer
whileprintingrecords;
numbervar CallCount;
numbervar HourCount;

CallCount:= CallCount+count(resourceFirstname, startDateTime)[red];[/red]
HourCount:= HourCount+1

You also don't need to specify "global" since that is the default.

-LB
 
LB,

Could you offer a different approach to solve this issue? Here are the formulas

I have two groups
group#1 resource.resourceFirstName
group#2 AgentConnectionDetail.startDateTime -->print for each hour

Formula
//@Reset
//Placed this in agent group header
Whileprintingrecords;

numbervar CallCount:=0;
numbervar HourCount:=0;


//@AVgData
// in hour group footer
whileprintingrecords;
numbervar CallCount;
numbervar HourCount;

CallCount:= CallCount+count({Resource.resourceFirstName},{AgentConnectionDetail.startDateTime});

HourCount:= HourCount+1

Why does the error "There must be a group that match this field" popup from the above formula
 
Change it to add the interval that you are using to group the datetime:

CallCount:= CallCount+count({Resource.resourceFirstName},{AgentConnectionDetail.startDateTime},"By Hour");

-LB
 
This is really wearing me down, now the warning "Division by zero" for this formula appears.

//@AVg
//Placed in Agent Group footer

whileprintingrecords;

global numbervar CallCount/global numbervar HourCount;
 
HourCount cannot be zero unless you didn't set that up to accumulate in your {@AvgData} formula. Please display what you used.

-LB
 
I have this for t @AvgData formula

//@AVgData
// in hour group footer
whileprintingrecords;
numbervar CallCount;
numbervar HourCount;

CallCount:= CallCount+count({Resource.resourceFirstName},{AgentConnectionDetail.startDateTime},"By Hour");

HourCount:= HourCount+1
 
Where did you place this formula? Where is the reset formula placed? In what sections?

-LB
 
I appreciate you answering the post:
the @avgdata formula is placed in the
group footer#1 AgentConnectionDetail.startDateTime which is printing by hour

the @reset formula is placed in the group header #2 resource.resourceFirstName which is the agent's name
 
If you want the average per hour per agent, Agent needs to be group #1, and the datetime by hour group should be Group #2. The reset should be in the Agent group #2 header, the {@AveData} should be in the hour group header or footer, and the display formula should be in the Agent group #1 footer. You can change the group order in the group expert by using the arrow keys.

-LB
 
LB,

There is no Agent Group # 2 Header. Header#2 is the datetime group
 
I meant to say:

If you want the average per hour per agent, Agent needs to be group #1, and the datetime by hour group should be Group #2. The reset should be in the Agent group #1 header, the {@AveData} should be in the hour group header #2 or footer, and the display formula should be in the Agent group #1 footer. You can change the group order in the group expert by using the arrow keys.

-LB

 
I wasn't sure, but that is what I did and yes the report is returning the desired data. I had to increase the date span to get more numbers. Thanks LB for your support.

IAT
 
lbass,

Is there a way to count from a particular point in time within an hour to another point in time to make up one hour as opposed to counting straight hours from the top of the hour?

For example, an agent takes his/her first call at 10:05 AM and ends the final call within one hour which is 11:05 AM

I understand another field from the database is needed to validate the count and the field maybe the talkTime field defined as <= startDateTime.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top