attribute value as function parameter

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • attribute value as function parameter


      I’ve got the following situation:

      A cube with dimensions Companies, Costcenters, Accounts, Periods and Measures.

      Every Account Element has an attribute (“ELIM_CC”) which holds an Costcenter number. I would like to extract the account number in the attribute and use it as parameter in a rule to determine the position of this account within the account hierarchy. Have a look at the following rules:

      The following rule extracts the string from the attribute:


      The previous statement works fine. But if I want to use the result as parameter I do not get a valid result:


      or like this


      It’s probably a simple syntax mistake or just a fundamental misunderstanding of the rule concept from my part, but with the rather sparse documentation, programming rules is more like solving a complex puzzle …

      Thanks in advance.

    • RE: attribute value as function parameter

      Hi Christian,

      I can't directly see anything wrong in the syntax here.

      Does every account have a value on the "ELIM_CC" attribute?
      If all N-level accounts have this attribute set make sure the rule is restricted to N: level.
      If only some of the accounts have a value for the "ELIM_CC" attribute (and for the other the attribute is empty), make sure that you do not try to retrieve the index or parent for this empty value.


      Edit: I see you posted this question also in another thread. As indicated there, make sure the "ELIM_CC" attribute is a text attribute, or - if you're using a numeric attribute - convert the retrieved value to string using the STR() function before passing it as a parameter to the index or parent functions.

      The post was edited 1 time, last by Michel ().