Print Page | Close Window

Distinct Count Formula problem

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Writing Code
Forum Discription: .NET 2003 programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13566
Printed Date: 28 Apr 2024 at 9:04pm


Topic: Distinct Count Formula problem
Posted By: andyme
Subject: Distinct Count Formula problem
Date Posted: 22 Jun 2011 at 2:32am
Hi all,

Wonder if you could help, on my report I have a distinct count of the Employee_No fields on a group field. On the same field though I need to also display the distinct no of employees by their age group. like in the example below. I have came to conclusion it needs to be done in a formula but having a little trouble with writing it, it's probably something dead simple. Any questions just ask. Thanks

Total Number     Age group      Age group     Age group
of Employees:      <30:        30-50:        50+
    90               20            55           15




Replies:
Posted By: hilfy
Date Posted: 25 Jul 2011 at 8:17am
You'll need a separate formula for each age group.  They'll look something like this:
 
mailto:%7b@Less - {@Less Than 30}
If {table.age} < 30 then {table.Employee_no}
 
You then do a distinct count of each of these formulas to get the number in each age group.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window