Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crosstab Deviding Summary fields... Post Reply Post New Topic
Author Message
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Topic: Crosstab Deviding Summary fields...
    Posted: 24 Jun 2009 at 1:43pm
Alright, so, i have a cross tab report.
it's counting the total number of people each department has seen.
and also how many days that department was open in the given month.
 
Now, i need a 3rd row to state the Avg # of Persons seen in that month.
 
In a normal report. This is really simple. devide the two sums and
whoah-lah! But, i'm trying to figure out how to do this in a cross tab.
 
If i try to do it with a formula like
 
#of persons seen total/days
it gives me an answer for the entire report, not for that specific month/dept.
 
any ideas?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Jun 2009 at 2:11pm
try and use a formula but include the group level that the crosstab is using (departments???)
COUNT(peoplefield,departmentfield) / SUM(days,departmentfield)
 
you may also want to include the ever handy if y=0 then 0 else x / y to avoid the division by zero error.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Jun 2009 at 2:12pm
note you need to actually design your report grouped by month then by department for this to work.
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 24 Jun 2009 at 2:26pm
alright, this is good. really good.
But, i still need it to calculate for only that month at a time as well....
i tried to add the timestamp field in there like you told me to do with the department. in hopes it'd work too hehe.
buuuut unfortunately. no go :(
 
 
 
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 24 Jun 2009 at 4:33pm
Resolved. Just had to do some more tweeking with you're concept dblank.
Thank you very much
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.