COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: superman99 on 12 Nov 2014 09:47:24 AM

Title: Using Wildcard in Report Studio for OLAP
Post by: superman99 on 12 Nov 2014 09:47:24 AM
Hello,

I have a olap cube and in report studio I want to exclude names that starts with ABC. I am trying to use a wildcard but it is not working.
Any suggestions

Thanks
Title: Re: Using Wildcard in Report Studio for OLAP
Post by: MFGF on 12 Nov 2014 10:44:34 AM
Quote from: superman99 on 12 Nov 2014 09:47:24 AM
I am trying to use a wildcard but it is not working.

It isn't? Thanks for sharing. :)

I can't imagine you're expecting anybody to be able to suggest what you might do to get the results you desire, though. If you were, you would surely have included lots of detail about what "wildcard" you are using, where you are using it, what expression you are using, and what "it is not working" means (error/wrong result/no result/etc).

If I posted a request to you that said "I am trying to prepare a cake - I am using a kitchen implement but it is not working", would you be able to tell me what I ought to be doing to achieve the result I require?

MF.
Title: Re: Using Wildcard in Report Studio for OLAP
Post by: Lynn on 12 Nov 2014 10:57:18 AM
Quote from: MFGF on 12 Nov 2014 10:44:34 AM

If I posted a request to you that said "I am trying to prepare a cake - I am using a kitchen implement but it is not working", would you be able to tell me what I ought to be doing to achieve the result I require?

MF.

Yes!! Step away from anything sharp. Turn off the stove and the oven. Next, go to a bakery and buy a cake.
Title: Re: Using Wildcard in Report Studio for OLAP
Post by: superman99 on 12 Nov 2014 11:02:43 AM
Thanks MFGF.
Apologize for not sharing the details,

I am trying a detail filter [Product] <> 'A%'

Attach please find the error scrennshots.

Thanks
Title: Re: Using Wildcard in Report Studio for OLAP
Post by: MFGF on 12 Nov 2014 11:21:29 AM
Quote from: superman99 on 12 Nov 2014 11:02:43 AM
Thanks MFGF.
Apologize for not sharing the details,

I am trying a detail filter [Product] <> 'A%'

Attach please find the error scrennshots.

Thanks

Hi,

Ok - a little more info there, thanks!

The BIG issue here is that you are using a detail filter with an OLAP-based package. Don't do this - really - don't! Detail filters are a relational reporting technique and you're not using a relational data source. Additionally, the levels you are using from your hierarchies comprise sets of members, not values. Each "Product" you see in the report is a member, which has both an ID and a Caption. Under the covers, the member is referenced by its ID (called its Member Unique Name or MUN), even though you see the caption displayed in the report. It sounds like you want to retrieve members based on parts of their captions?

Here's my advice:

1. Delete the detail filter. Don't ever add detail filters to dimensional reports in future :)
2. Delete the item in your report you are trying to filter on (the Product level, in this case).
3. Replace the item with a query calculation that uses a dimensional filter() function, eg

filter([Your Product level], caption([Your Product level]) not starts with 'A')

Hopefully this should give you the result you are hoping for.

MF.
Title: Re: Using Wildcard in Report Studio for OLAP
Post by: MFGF on 12 Nov 2014 11:24:41 AM
Quote from: Lynn on 12 Nov 2014 10:57:18 AM
Yes!! Step away from anything sharp. Turn off the stove and the oven. Next, go to a bakery and buy a cake.

Sigh. You're very wise, Lynn! The only saving grace is that my kitchen doesn't really contain anything sharp :)
Title: Re: Using Wildcard in Report Studio for OLAP
Post by: superman99 on 12 Nov 2014 02:42:44 PM
Thanks MFGF  :)