COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: pakogalan on 20 Feb 2012 10:19:16 AM

Title: How to exclude items from a data package ?
Post by: pakogalan on 20 Feb 2012 10:19:16 AM
Hello

Do anyone has any suggestions on a query to exclude some items from a package please ?

I have a package that is called for instance " DataPackage" and I would like to exclude two items, one is "LA" the other ones is blank or empty " null ".

I have tried several combinations bu nothing worked.
ie:  IF (DataPackage='LA'or'null) Then("") Else ("here I name the rest of the items in the package that I want" )

I get error:
QE-DEF-0459CLLException


any ideas ?


Thanks
Title: Re: How to exclude items from a data package ?
Post by: blom0344 on 21 Feb 2012 08:31:43 AM
items?  You are mixing metadata with data.  Exclude metadata items by setting them as hidden.

For data write a proper case:

CASE WHEN
[somedataitem] = 'LA' THEN ''
WHEN
[somedataitem] is null then ''
else
[somedataitem]
END

You cannot select part of the metadata that constitutes a packages by means of an expression