COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: inu on 15 Mar 2017 01:57:45 AM

Title: How to do operations at year level in dmr reporting
Post by: inu on 15 Mar 2017 01:57:45 AM
Hi Team,
I have year prompt, i used year level, its displaying 2016 to 2050.
But i want to restrict that , year <=extract(Year, current_date).

How to do in slicer, or any other approach, we can do it, please suggest.



Regards,
Inam
Title: Re: How to do operations at year level in dmr reporting
Post by: New_Guy on 21 Mar 2017 02:29:43 PM
Hi,
We cannot use less then or greater for the members, instead we can use dimensional functions like periodstodate. Please check the dimensional functions in the data item expression window. Let me know if you still need help.
Good luck
New Guy
Title: Re: How to do operations at year level in dmr reporting
Post by: inu on 22 Mar 2017 09:15:47 AM
Quote from: New_Guy on 21 Mar 2017 02:29:43 PM
Hi,
We cannot use less then or greater for the members, instead we can use dimensional functions like periodstodate. Please check the dimensional functions in the data item expression window. Let me know if you still need help.
Good luck
New Guy
[quote author=Inu
Yes, i have clear concept on dmr reporting, i am asking that , how to get that output, you told that , check function, then why should i ask here.

Dont mind please.



Regards,
Inam
Title: Re: How to do operations at year level in dmr reporting
Post by: New_Guy on 22 Mar 2017 09:42:11 AM
Hi Inu,
Not a proble and Sorry about that, I will try to reply to the posts as much as I can from what I know and the time I have.

Using a macro you can construct a MUN in a data item and use that to get a set with periods to date and use that set in the prompt.
The place I work has flags saying current period attribute for the time dimension members as 'CM', 'CY' for current periods and 'N' for the previous periods, then we will use a detail filter as [Time dimension].[Current period] in ('CY', 'N') to bring in the members till current year.

Let me know if I am still wrong.

Good luck
New Guy.
Title: Re: How to do operations at year level in dmr reporting
Post by: bdbits on 22 Mar 2017 10:07:40 AM
If your prompt is based on a query, you can use the same functionality you would with any query (e.g. a slicer or a filter() expression) to limit the result set.

But please, for dimensional data, never use detail filters. Thanks.
Title: Re: How to do operations at year level in dmr reporting
Post by: Deep750 on 23 Mar 2017 04:25:30 AM
HAvent been working with DMR for many years, but here is a suggestion, if you have relative time members:

filter([YEAR-level], roleValue('_memberCaption', [YEAR-level]<= roleValue('_memberCaption', [currentYear]))

haven't checked the syntax, so please check it before implementing ;)
Title: Re: How to do operations at year level in dmr reporting
Post by: inu on 28 Mar 2017 02:12:58 AM
Quote from: Deep750 on 23 Mar 2017 04:25:30 AM
HAvent been working with DMR for many years, but here is a suggestion, if you have relative time members:

filter([YEAR-level], roleValue('_memberCaption', [YEAR-level]<= roleValue('_memberCaption', [currentYear]))

haven't checked the syntax, so please check it before implementing ;)

Quote from: inam on 23 Mar 2017 04:25:30 AM
How can i create relative time , can you please explain it.


Title: Re: How to do operations at year level in dmr reporting
Post by: inu on 06 Apr 2017 06:40:47 AM
Quote from: inu on 28 Mar 2017 02:12:58 AM



How to achieve current year, the syntax you provided, each and every word is important to be understood by me. because this is dmr, to get tiny item as well , we have to suffer a lot.