Author Topic: roleValue woes !!!!!  (Read 245 times)

Offline AJAYC

  • Senior Member
  • ****
  • Join Date: Apr 2012
  • Posts: 63
  • Forum Citizenship: +2/-0
roleValue woes !!!!!
« on: 08 Aug 2017 06:44:24 am »
Hi All

I'm struggling with the roleValue function in RS with TM1 attributes.

I have a "YearMonth" TM1 dimension, and have prompted for an element "201706" from within it. The dimension contains an attribute called "YearMonthYTD", so for this element selected it has a unique value of "201706YTD".

The attribute value nicely corresponds to a hierarchy within the dimension called "201706YTD" which contains members which should provide the appropriate value.

In my testing I am trying to retrieve the attribute using a data item, but I just can't seem to pickup the attribute let alone convert it to a the member I need.

I'm trying the following:

roleValue ('YearMonthYTD',[blah].[blah].[blah]->?promptedYearMonth? )

In a crosstab, I have two columns, one of which is the prompted "201706" and the other which is the data item for the YTD equivalent but both return the same numbers - that for "201706".

Has anyone successfully utilised this functionality in RS ?


Offline New_Guy

  • Statesman
  • ******
  • Join Date: Mar 2016
  • Posts: 308
  • Forum Citizenship: +15/-0
Re: roleValue woes !!!!!
« Reply #1 on: 08 Aug 2017 09:47:57 am »
The function roleValue is used in to get business key, memberCaption, MUN.
item(filter([blah].[blah].[blah],roleValue('_memberCaption',[blah].[blah].[blah]->?promptedYearMonth?) ,0)). Check the dimensional functions in the expression window for the right syntax.
You can try using the YTD members in the prompt and use
[blah].[blah].[blah] ->  ?promptedYearMonth?

Good luck
New guy