Sum formula (1 Viewer)

ryadav

Registered User.
Local time
Today, 03:37
Joined
Jul 11, 2006
Messages
13
Hi

I am working on a report in Crystal 10, which calculates the area a person occupies in a room.

I have set the report out in the following way.

|(GH1) Faculty

|(GH2)Department #of staff Room area Occupied M2 per person|

Group Header 1 is Core_faculty.faculty_code
Group Header 2 is core_department.dept_num

The number of staff is Count of CORE_staff.job_title and the room area occupied is Sum of BD_room.Room_area. Therefore, I have created a formula for m2 per person which is Sum ({BD_room.Room_area})/(Count ({CORE_staff.job_title})).
*can i just note that the reason why i have used CORE_staff.job_title is because job_title has Academic, and Administrative in the field and this report is only for administrative. So I have added administrative in the details field and specified in select expert to only =Administrative. So the Count ({CORE_staff.job_title} is the count of adminstrative staff in that department.*

Anyway, when i run the report the number of staff and room area for each department is correct, but the m2 per person is incorrect as it shows the same figure for each department.

Can someone please advise me on where I am going wrong.

I hope the information above makes sense. I have attached the report in excel format so you can see what it looks like when i run it.

thanks
 

Attachments

  • ed20.zip
    16.6 KB · Views: 407

Kempes

Registered User.
Local time
Today, 03:37
Joined
Oct 7, 2004
Messages
327
If I have read this correctly, I think all you need to do is include the condition into your count.

Try this

Sum ({BD_room.Room_area})/Count ({CORE_staff.job_title}, CORE_staff.job_title})

Any Joy?
 

Users who are viewing this thread

Top Bottom