Hi,
I need help filtering out customers who haven't bought a certain product line. This is being done in a relational crosstab. Here is a sample of what the report looks like:
(http://home.insightbb.com/~livens/img/crossSamp.JPG)
It shows the market share of each product sold to individual customers, customers are grouped by an internal criteria. What I want to do is not show any customers who did not sell the '123' product. So in this example 'Cust 1' would not be shown because they had no sales of '123'.
Ive tried several approaches in the filters but nothing I try works. I added a Data Item that sums up the sales of '123', then filtered on that being > 0 in the Summary Filters section, setting the scope to Year and Customers.
Thanks,
Jeremy
I don't do a lot of report design, but try this...
http://www-01.ibm.com/support/docview.wss?uid=swg21344613
In your example, there are nulls rather than nills (Or zeros). Try filtering by "is not null" rather than ">0"
This is not a matter concerning filtering. The solution lies in building the crosstab against the combination of 2 - joined - queries. The first query is the one you have now. The second query should only fetch customer(id) associated with sold/bought product 123.
The resulting set from the joined queries ( joined over customer(id) ) will then give you the required dataset.
you have to go with outer join,rest do what Blom0344,the ultimate Cognos guru suggested.Thanks
Why an outer join? A straight join will make sure that customers that do not meet the requirement are removed from the final set, yielding on those that are associated with sold/bought product 123
Quote from: blom0344 on 27 Feb 2012 02:05:33 AM
Why an outer join? A straight join will make sure that customers that do not meet the requirement are removed from the final set, yielding on those that are associated with sold/bought product 123
blom0344, thank you very much! Worked perfectly.
And to barrysaab's outer join suggestion, I changed the join to and 'outer join' and it stopped
filtering,sorry, excluding the companies that did not purchase 123.
+1 to blom0344 :)
Jeremy