COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: suhas_bhat on 12 Feb 2014 09:19:50 AM

Title: How to filter a dmr based report?
Post by: suhas_bhat on 12 Feb 2014 09:19:50 AM
Hi All,
    I need to filter members in a certain hierarchy based on values coming in from the prompt page.
Prompt page is using a simple drop down that is populated by the member calendar year that belongs to level year within date dimension.

How do i pass this value to my report query?
I tried a simple calendar year -> ?p_year?

Can anyone show me the right way to add filter/slice on a DMR package.

This DMR was created in FM itself.


Title: Re: How to filter a dmr based report?
Post by: Francis aka khayman on 13 Feb 2014 02:53:35 AM
Create data item

Chosen Year = [Time].[Year].[Year]->?pYear?

you can already use this as a context filter or as a data item.

Title: Re: How to filter a dmr based report?
Post by: suhas_bhat on 14 Feb 2014 12:20:39 AM
Thans khayman, but i do not know why that was not working.

I've tried this now and it works.
#promptmany('p_year','memberuniquename','[Presentation Layer].[hierarchy].[dimension].[level)]','set(', '', ')')#

The prompt has to also be populated by the level itself.
Title: Re: How to filter a dmr based report?
Post by: Francis aka khayman on 14 Feb 2014 12:39:20 AM
now that you mentioned it, for multiple value prompt....

set([dimension].[hierarcy].[level]->?manyvalueprompts?)

was not returning the proper calculations in one of our reports. it was changed to the one you posted and it worked fine.