COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Magdalina08 on 26 Dec 2020 06:42:25 PM

Title: Filter a list based on a parent list
Post by: Magdalina08 on 26 Dec 2020 06:42:25 PM
I have a report which has list of vendors. These vendors are sorted by a set top 55 and then the remaining below. I need to have another tab which only shows certain vendors who fall within a certain percentage change, but I only need to show this for vendors in the top 55. Is there a way to filter on list based on another? I tried a master detail relationship between two lists, but it doesn't seem to be working properly.

List A: Sorted properly where top 55 vendors show first. I then added a running count data item and set this for 1-56.

List B: Added new list and filtered for the percentage needed: vendors >= 5

This is showing only 55 vendors but they are out of order, not the correct top 55.

Is there a different way to tackle this or can anyone help me with what I'm doing wrong?
Title: Re: Filter a list based on a parent list
Post by: dougp on 28 Dec 2020 11:07:32 AM
Assuming List A uses Query A and List B uses Query B...

Create Query C that joins Query B to Query A on Vendor ID with the cardinality 1..1 on both sides.
Drag in all of the data items from Query B into Query C.
Change the Query for List B from Query B to Query C.