COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS Impromptu => Topic started by: philman2006 on 25 Oct 2007 12:55:52 PM

Title: Total Count on duplicate records
Post by: philman2006 on 25 Oct 2007 12:55:52 PM
I have a report that contains a machine number, tonnage number, and part number.  I need a count of all part part numbers assigned to particular machine number.  When I use Count it gives a total count for all items including duplicates.   If I use Running-Count I get the count of each line item including duplicates.  I would like to have my report display a total part numbers for each machine number.  For example I may have 20 line items for Machine 5.  I am getting a Count of 20.  Actually the report should be Machine 5 at 8 part numbers.

I would appreciate any assistance.  Thank you in advance for taking the time to respond.

If I have you confused I can elaborate more on the subject.
Title: Re: Total Count on duplicate records
Post by: spyder2000 on 07 Nov 2007 07:50:18 PM
Try grouping the part number within machine number, then associating the count with the part numbers (on the group tab).
Title: Re: Total Count on duplicate records
Post by: philman2006 on 08 Nov 2007 12:58:38 PM
I was able to figure it out with a little help.  I already had the grouping in place.  The hard part was that the "Distinct" option would not always appear.  It took me a few tries but I was finally able to get it.  Here is the formula.....

count(distinct(mold#))for machine#

Thanks for taking the time to respond.
Phil