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

Formula: Average Day Total In crystal

Status
Not open for further replies.

thehugedeal

Technical User
Jan 9, 2004
38
CA
Hi Everyone

Is there a way to calculate the average of days in a month by the day within crystal
I am using Crystal 9.0

Example
Monday Tuesday Wednesday Thursday Friday Saturday
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Sunday

2 1 3 4
5 1 2 3 5
4 3 6 7 6


Average Average Average Average Average Average Average

Monday Tuesday Wednesday Thursday Friday Saturday
Sunday
2.5 3 3.5 3.5 5.5
4 4

Any Help would be great
 
Create a formula {@dow}:

dayofweek({table.date})

Insert a crosstab and use this formula as your column field. In the crosstab expert, highlight this column field->group options->options->customize the group name->use a formula to customize name->x+2 and enter:

weekdayname(dayofweek({table.date}))

Then add your summary field, choosing average as the summary. Place the crosstab in the report header or footer.

-LB
 
To good to be true
One more question. Is it possible to add the average days to the end of the cross tab. (Summarized Fields).

Example
Average Average Average Average Average
Monday Tuesday Wednesday Thursday Friday Monday Tuesday
Wednesday Thursday Friday Monday Tuesday Wednesday
Thursday Friday Etc

2 1 2 3
6 1 4 2 3
5 1.5 2.5 2
3 5.5
 
If you had used my formula as the column header, you would not see repeated days as you are showing, so what did you actually do? Do you really want to show something other than the average also? Please identify your summaries also.

-LB
 
My Fault 100%, I have been working on this for about a week and it just got to me.
The Formula works 100%. Is it just possible to still keep the daily stats but with the average days as the summaries?
This is what I created
Summary
Mon Tues Wed Thurs Fri Mon Tues Wed Thurs Fri Total Average
8:00 4 2 3 1 5 2 1 4 5 2 29 2.9
8:15 2 4 3 4 5 6 4 2 6 1 37 3.7
Total 6 6 6 5 10 8 5 6 11 3 66 6.6

I would like to add the average of days at the end of the cross tab report
Summary
Aver Aver Aver Aver Aver
Mon Tues Wed Thurs Fri Mon Tues Wed Thurs Fri Total Average Mon Tues Wed Thurs Fri
8:00 4 2 3 1 5 2 1 4 5 2 29 2.9 3 1.5 3.5 3 3.5
8:15 2 4 3 4 5 6 4 2 6 1 37 3.7 4 4 2.5 5 3
Total 6 6 6 5 10 8 5 6 11 3 66 6.6 7 5.5 6 8 6.5

Is there a way to add the Average days to the report?
 
If you used a crosstab to get the current result, add a second crosstab for the averages. If CR 9 allows it, in the section expert format the section that contains the crosstabs to "relative positions".

-LB
 
Lbass:

I am so sorry for sending this message so late but thank you so much for helping me out with this problem. I can't thank you enough.

Bruno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top