COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: giovanni.lucarelli on 21 May 2009 08:37:52 AM

Title: passing parameter between dimensions
Post by: giovanni.lucarelli on 21 May 2009 08:37:52 AM
hi,

does anybody know how to pass parameter between different dimensions?

I explaine better...

I have two time dimensions, A and B, and fact table (for billing measure, for example). Time dimension A is used in prompt to select a day... so I have ?par_SELECTED_DAY? ...

if I define in query-master a new query item, named SELECTED_DAY, [...]..[YEAR].[MONTH].[DAY] -> ?par_SELECTED_DAY?
and I produce this report:


SELECTED_DAY   Billing
XXXX                12233


doens't work!!!!


thanks very much.... please iit's very important!!!!

Title: Re: passing parameter between dimensions
Post by: david.stachon on 23 May 2009 12:05:29 AM
because you're dealing with two distinct time dimensions, the MUNs will not work between them.

Likely, you'll need to drill and filter by a different role value. probably on _memberCaption would do the trick.
Title: Re: passing parameter between dimensions
Post by: giovanni.lucarelli on 23 May 2009 08:24:15 AM
thanks very much david.stachon, but please, give me same example....

i give u more informations: I use a DMR; in the report user wants to select a day in time dimension; level day is this: (dimensions A and B are totally the same)

Day (ex. 19-05-2009, char type) is my business key and my member caption
Day Date (date type) is attribute
Day description (ex. monday, char type) is attribute

i cannot use alias (shortcut) for A and B 'cause user wants different name for levels and attributes in dimensions, for ex:

Billing time Dimension
Billing year
Billing semester
Billing quarter
Billing month
Billing Day
Billing Date day
Billing Day dascription

Order time Dimension
Order year
Order semester
Order quarter
Order month
Order Day
Order Date day
Order Day dascription


tell me if u need more information...

thanks very much!!!!




Title: Re: passing parameter between dimensions
Post by: david.stachon on 23 May 2009 05:16:26 PM
what version are you on? ....I could send you a sample if you'd like.

...but the idea is to do this:

_roleVale('_memberCaption',[Billing Year]) = _roleValue('_memberCaption',[Order Year])

which translates to something like:

'2008' = '2008'

just doing this: [Billing Year] = [Order Year]

....will compare MUNs which will never be equal between the two dimensions (i.e. because the name of the dimension is included in the MUN)
Title: Re: passing parameter between dimensions
Post by: giovanni.lucarelli on 25 May 2009 04:55:19 AM
ciao David,

I am using 8.4...however I'll try asap to verify it... thanks very much... I'll tell u how is going to


ciao