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

Average traffic over 4 time periods

Status
Not open for further replies.

thetoftee

Technical User
Jul 3, 2013
5
GB
Hi,

I have a set of data that is in quarter hourly granularity showing traffic for each 15 minute time period. I need to find the average traffic across 4 15 minute time periods and then from that find the busy hour.

I having been looking at using running totals but haven't got a clue how to create a forumla to define this.

I'm pretty new to crystal and any help would be much appreciated.

Thanks
 
Group the data by Time (for each hour) and add an "Average" summary. Then use the Group Sort Expert to do a Top N ranking of the groups by Hourly average.

Hope this helps.

Cheers
Pete.
 
Hi thanks for the advice, but I need to be able to get an average across any 4 time periods for example the 4 15 minute time periods between 1300 1315 1330 1345 would be one average, then I need the average of 1315 1330 1345 1400 and so on

I've tried grouping them by hour, but can't get the running average if you know what I mean.

Thanks

James
 
OK, that makes it a far more interesting challenge.

Create the following formula:

Code:
WhilePrintingRecords;
Global NumberVar A;
Global NumberVar B;
Global NumberVar C;
Global NumberVar D;

A := {Table.Data} + B;
B := {Table.Data} + C;
C := {Table.Data} + D;
D := {Table.Data};
A/4

, where {Table.Data} is the data you want averaged. The result of this formula is the average of the current and 3 previous records.

Does this help?


Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top