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

Count/Sum problem with multiple occurrences of EMPL ID

Status
Not open for further replies.

agray123

Technical User
Mar 4, 2002
110
US
I am using a count function on a table of Benefit deductions and deduction codes to produce a total by ded code for a given pay period. The problem is that sometimes we make adjustments on a given EMPL ID and 2 records show up for that one ID. I need to know if there is a way I can count those as only one entry to produce an accurate count. Otherwise, we end up with more deductions than employees and I have to come up with a quick excuse!
 
I assume you are grouping by employee_ID.

Instead of using he COUNT function, use the DISTINCT COUNT
function. Use the Employee_ID field in the Deduction table as the field to count on.

Howard Hammerman,

Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
800-783-2269
 
Thanks, I guess the circumstances I am talking about above have not happened in the period I am running the report on becuse the toals did not change. I will check with our benefits group to see if they can give me a pay period when it DID occur for a test.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top