COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: JoelR on 11 Jan 2008 11:02:47 AM

Title: How would you approach this situation?
Post by: JoelR on 11 Jan 2008 11:02:47 AM
I want to make a report that displays the multiple names of people who have been assigned to just one work order.  Sometimes just one person is assigned to just one work order, so I don't want empty rows to appear for null fields in those situations.  The name's of the people fields and the work order field are in the same table.
Title: Re: How would you approach this situation?
Post by: ajax6262 on 11 Jan 2008 12:39:47 PM
Add the name field to a list report, then add a data item to the query with the expression of count (distinct [work_order] for Name).  Then add a filter on this new data item where it equals 1.  Set it to filter after aggregation.  It should now return just the names of people who only have 1 work order assigned to them.
Title: Re: How would you approach this situation?
Post by: JoelR on 11 Jan 2008 01:29:03 PM
That's great! Thanks, it works, but it only works for one of my name fields.  I have 3 name fields.  When I try repeating your steps for the other fields nothing ends up showing up.
Title: Re: How would you approach this situation?
Post by: ajax6262 on 11 Jan 2008 02:19:04 PM
Is it possible that the other name fields don't have anyone with only 1 work order assigned?
Title: Re: How would you approach this situation?
Post by: JoelR on 14 Jan 2008 01:35:40 PM
Thanks, It wasn't that but I just had to pay attention to other details of setting up the fields.