IBM Cognos Planning Data Validation Example Nature of Document: Tip or Technique Product(s): IBM Cognos Planning Area of Interest: Modeling
2 Copyright and Trademarks Licensed Materials - Property of IBM. Copyright IBM Corp. 2010 IBM, the IBM logo, and Cognos are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml While every attempt has been made to ensure that the information in this document is accurate and complete, some typographical errors or technical inaccuracies may exist. IBM does not accept responsibility for any kind of loss resulting from the use of information contained in this document. The information contained in this document is subject to change without notice. This document is maintained by the Best Practices, Product and Technology team. You can send comments, suggestions, and additions to cscogpp@ca.ibm.com.
3 Table of Contents 1 Introduction...4 1.1 Purpose... 4 1.2 Applicability... 4 1.3 Exclusions and Exceptions...4 2 Creating a Data Validation Rule...4 1.1 Model Overview...4 1.2 Creating the Data Validation Rule in Contributor Administration... 6
4 1 Introduction 1.1 Purpose This document is provided to supplement to the IBM Cognos Planning product documentation in the area of Data Validations. This document will provide an example of creating a Data Validation for IBM Cognos Planning. 1.2 Applicability IBM Cognos Planning versions 8.3 and higher. 1.3 Exclusions and Exceptions No exclusions or exceptions have been identified.
5 2 Creating a Data Validation Rule IBM Cognos Planning provides planning modelers with the ability to create and enforce data entry rules. These rules can be used to ensure adherence to corporate policies, to ensure that expense maximums are not exceeded in a plan, budget or forecast, to ensure correct staffing levels are planned, and for many other uses in planning models. This document will provide a basic example of using a Data Validation to ensure that users do not exceed a monthly maximum amount of $75,000 in their forecast for Discretionary Expenses. The model used in this example is the Expense Planning and Control Blueprint created by the IBM Cognos Innovation Center. 2.1 Model Overview 1. The Expense Planning and Control Blueprint is provided with a sample e-list hierarchy which is pictured below. For this example, we will focus on a single node in that e-list called US Finance. We will create and apply a Data Validation for just that node and for just a single expense item called Discretionary Expenses.
6 2. One of the cubes in the Expense Planning and Control Blueprint is called Expense Summary. This is the cube that contains the Discretionary Expenses field that the Data Validation will be tested on. 1.1 Creating the Data Validation Rule in Contributor Administration 1. Open IBM Cognos Planning Contributor Administration. 2. Expand the Planning Datastore Application Development Data Validations folders. Click on Rules folder.
7 3. In the right-side pane click the New button. This will start the New Validation Rule Wizard. 4. In the New Validation Rule Wizard click the Next> button. 5. Enter a descriptive name for the Data Validation Rule that is being created.
8 6. Enter the message that will be displayed to Contributor users when the Validation Rule has been violated. This should be descriptive and detailed enough for a user to be able to understand what the violation was and how to correct the violation and proceed with the completion of their plan. 7. Click Next> after you have finished entering the rule name and description. 8. Validation Rules can only be applied to a single cube, choose the cube that the rule will be applied to.
9 9. Click Next>. 10. Validation Rules can only be applied to a single dimension. Choose the dimension that the rule will be applied to.
10 11. Click Next>. 12. Define the Validation Rule expression. Validation Rules are typically conditional statements which can be defined as IF THEN ELSE in the Validation Rules Expression editor. Convenient buttons have been provided for conditional statements and operators. All fields that are in the cube and dimension that was selected are available to insert in to the Validation Rule Expression editor. In the example below, the Validation Rule has been defined as: IF Discretionary Expenses > 75000 THEN 0 ELSE 1 This was created by clicking the IF button, selecting Discretionary Expenses from the dimension items list and clicking the blue insert arrow, clicking the greater than > button, manually typing in 75000, clicking the THEN button, typing in 0, clicking the ELSE ; and typing in 1. In IBM Cognos Planning Data Validations, the condition 0 = rule failed; the condition 1 = rule passed. In the example rule, if Discretionary Expenses is greater than $75,000 then the rule has been violated and the error message will be displayed to the Contributor user. If the value is less than $75,000 then the rule has passed and no action will be taken by the Data Validations.
11 Note: it is possible to create 2 rules that conflict with each other and that can prevent a user from passing the full validation. Take care in defining your rules so that they do not conflict or create a scenario which prevents a user from successfully completing their plan. 13. After the rule expression has been created, click Next>.
12 14. Define the Scope of the Rule. Choose the cube dimensions to which the rule will be applied. In this example, the rule will only apply to individual monthly amounts, not to the yearly totals. So ALL DETAIL was selected as the scope for the Months dimension. This rule will only apply to the Current Forecast version, so only that item was selected from the Versions dimension. 15. Click Next> to complete the Rule Validation Wizard. 16. You can define as many rules in the Rules folder as you like. These rules can then be grouped into related Rule Sets and applied to various individual or all e-list items. 17. Click on the Rule Sets folder in the left pane of the Contributor Administration application. 18. Enter a descriptive Rule Set Name.
13 19. Choose the Fail Action that will occur when a rule in the Rule Set is violated. The actions are in order from least restrictive (Contributor user just sees a warning message) to most restrictive (Contributor user is prevented from saving or submitting their entries until the violation is corrected). 20. Select the Rules you would like to add to this Rule Set and then click the Add button. Note: It is NOT a recommended practice to choose Restrict Save and Submit as a user could potentially lose data if they do not correct the Validation Error and simply exit Contributor without saving. I better option is to choose Restict Submit or Message Only as both these options still allow a contributor to save their data entries.
14 21. Click OK when you have completed adding the rules to the Rule Set. 22. In the left pane of the Contributor Administration application, click on the Rule Set e.list Items folder. 23. Select the Validation Rule Set you want to apply, Select the e.list items you would like to apply it to (Be aware when applying rules to aggregate level e.list items that any amounts entered into the Rule expression editor will be applied to those aggregate e.list items). 24. In this example, the rule set will only be applied to a single e.list item: US Finance.
15 25. After the Rule Set has been added to the e.list item(s), click on the Save icon at the top right menu section of the Contributor Administration application. 26. Run a Go To Production on the application.
16 27. Test the Data Validation by opening the Contributor application and entering a value that will trigger a rule violation.
17 28. After you have entered a value that should trigger the rule, go to the drop down menu at the top of the Contributor client and select: File > Validate. 29. If your Data Validation was correctly defined then the violation should trigger the rule and your rule message should be displayed along with a model location link that will take the user to the cell that has caused the violation.
18 30. In this example, the most restrictive rule option was selected which prevents saving or submitting of the data. If the Contributor attempts to save the data, the following message is displayed: 31. In order to save the data, the user must correct the error or quit the application and lose any data changes from that session. This document has presented a basic example of a Data Validation Rule in IBM Cognos Planning. For more detailed information on Data Validation Rules, see the IBM Cognos Planning 8 Contributor Administration Guide.