COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: tgs728 on 28 Mar 2012 05:45:00 AM

Title: filtering on start date
Post by: tgs728 on 28 Mar 2012 05:45:00 AM
Hi al,

I am having a issue to apply a filter,

Product line  product type   start date
CE                CGears          Aug 02 2012
                    Tents           Sep  21 2012
                    Tools            Oct 23 2012
GE                AB              Sep 21  2012
                    BC              Aug 22 2012

CE               CGears        Aug 02 2011
                  Tents          oct 13 2011
                  Tools           Sep 28 2011

Here i need to avoid the tools whose start date is les than the tents.

Guys can you help on this ho w to write a filter in report studio.

Thanks ,
TGS
Title: Re: filtering on start date
Post by: colt on 29 Mar 2012 09:32:50 AM
You can define a dataitem [CE]='CE' and second dataitem [Tents]='Tents'.
Then [MAXDATEFORTENTS]=maximum([start date] for [CE],[Tents])

And finally the filter : [start date] <= [MAXDATEFORTENTS]