COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: aaspden on 02 Mar 2018 08:39:35 PM

Title: Limit to 1 row per data item value
Post by: aaspden on 02 Mar 2018 08:39:35 PM
Hi guys. I've been reading all kinds of information about rank, counting, distinct and singletons online but I can't seem to find an exact match to what I'm after. Grouping seems to display the info correctly, but when I export as XML, the duplicate records return. I have an ID column that can have duplicates or not, I want to limit the returned rows per unique ID to 1. I can clearly see the reason for the duplicates is due to the corresponding information that I am NOT including in my report output. Thanks for any help!
Title: Re: Limit to 1 row per data item value
Post by: sdf on 09 Mar 2018 01:14:10 AM
do you just need to extract the unique IDs or you need to extract 1 row per unique ID?
Is your report based on a list? maybe you can use the max() function on the columns that causes the IDs to duplicate.