RoleValue() function

This recipe will show you a useful function which you will often need while working with dimensional and dimensionally-modeled-relational models.

As the purpose of this recipe is only to examine this function, we won't consider any specific business case here.

Getting ready

Create a new list type of report based on the same GO Sales SSAS Cube package.

How to do it...

  1. From Insertable Objects, locate Organization Code2.
    How to do it...
  2. Drag it on the list as a new column.
  3. Now add a new data item to the list. Define it as: roleValue('_businessKey',[Organization Code2]).
    How to do it...
  4. Add two more data items and define them as follows:
    roleValue('_memberCaption',[Organization Code2])
    roleValue('_memberUniqueName',[Organization Code2])
  5. Run the report to test it.
How to do it...

How it works...

When defining a DMR (Dimensionally Modeled Relational) model in Framework Manager, the modeler can define various columns as attributes. This roleValue() function allows you to access these attributes.

This function takes two arguments: Role and Member/Set.

In case of MSAS cube, we can't define custom attributes in FM. However, we can still use this function to access intrinsic roles: _businessKey, _memberCaption, _memberDescription, _memberUniqueName. In this recipe, we checked some of these intrinsic roles.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset