IBM Planning Analytics is great at performing many rule calculations across cells in a cube. Rules are useful for instant, calculated results in a cube based on user inputs. But as the number of rules against a Planning Analytics cube increases, the harder it can get to keep track of them all. Lots of rules means lots of scrolling and digging to find which rules apply to which cells. This can make navigating the rule file and troubleshooting the result of a specific cell quite cumbersome. With Rule Regions, a Planning Analytics rule file can be organized in a way so that it is much easier to navigate.

Rule Regions will not work in Planning Analytics Local when accessing the rule file through Perspectives or Architect, but they will work in Planning Analytics Workspace. Planning Analytics Workspace is the preferred, more user-friendly place to work on rules, due to its color formatting and clearer error notifications.

Steps
Rule Regions are very easy to create in PAW by simply adding two comments to a rule file. Firstly, open the rule file in PAW by expanding the desired cube, right clicking on the rule file, and selecting “Edit business rules”.

 

 

 

 

To create a new region in the rule file, simply add a comment in the form of #Region <region name> where <region name> is any descriptive name of the region. Then, at the bottom of the section of the rules around which you are creating a region, add a comment that says #EndRegion. Note that capitalization in these comments is required, and only #Region and #EndRegion will work. See below, where a region called Consolidated Amounts was created around some C-level Amount rules.

 

 

 

 

 

 

The most useful aspect of rule regions is the collapse feature. Now that the region has been created, the section of rules can be expanded and collapsed at will to better navigate the rules file. Expanding and collapsing is accomplished by clicking the tiny arrow symbol to the left of #Region.

Expanded:

 

 

Collapsed:

 

 

Also, regions can be placed inside of regions to make the organization even more granular.

 

 

 

 

 

Summary
Creating Rule Regions in PAW is a great way to organize rule files. Just by adding two comment lines in the rule file, #Region <region name> and #EndRegion, a Rule Region is created. The ability to expand and collapse sections of the rules is a great way to find the rules you’re looking for and make a cube rule file less daunting to navigate.