The roleValue() function

This recipe will show you a useful function which you will often need while working with dimensional and DMR 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 report based on the Sales and Marketing (cube) package.

How to do it...

In this recipe we will see how the roleValue() function works and how you can use it in your reports, as follows:

  1. In Source under Insertable Objects, locate Retailer name:
    How to do it...
  2. Drag it onto the list as a new column.
  3. Now, add a new data item to the list. Define it as:

    roleValue('_businessKey', [Retailer ...

Get IBM Cognos 10 Report Studio Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.