2697762-Essbade.pdf

February 23, 2018 | Author: ajay8086 | Category: Cost Of Goods Sold, Data Management, Computer Data, Technology, Computing
Share Embed Donate


Short Description

Download 2697762-Essbade.pdf...

Description

Hyperion Essbase Analytics 9.3.1 Calculate Databases

y m

Activity Guide

e d a

D53220GC10 Edition 1.0 January 2008 D53891

a r O

e l c

e l c a r O ly & On l a e n r s e t U n I ®

c A

Author

Copyright © 2008, Oracle. All rights reserved.

Lisa Alexander

Disclaimer

Technical Contributors and Reviewers Lucia Cooper Paul Hoch Brian O’Donnell Stanley Ziolkowski Steven Cranford

This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free.

Editor

Restricted Rights Notice

Jessie Wood

If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable:

Graphic Designer

Publisher

U.S. GOVERNMENT RIGHTS The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

Judy Gaitan

Trademark Notice

Carisa Cannan

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

e d a

y m

a r O

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

Table of Contents

0

Exercises Lesson 3:

Developing Calculation Scripts

Exercise 3.1 Exercise 3.2 Exercise 3.3

Testing Intelligent Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Comparing FIX and IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Testing Calculation Member Block Syntax . . . . . . . . . . . . . . . . . . . . . . . . 3

Lesson 4:

Developing Advanced Calculations

Exercise 4.1 Exercise 4.2 Exercise 4.3 Exercise 4.4 Exercise 4.5

Creating Complex Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Creating a Baseline Forecast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Creating a Working Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Creating Empty Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Calculating a Rolling Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Lesson 5:

Calculating Dynamically

y m

e d a

c A

Exercise 5.1 Eliminating Back Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Modifying CalcAll.csc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Testing Dynamic Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Exercise 5.2 Optimizing with Dynamic Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . 12

e l c a r O ly & On l a e n r s e t U n I

Lesson 6:

Normalizing Data

Exercise 6.1 Exercise 6.2 Exercise 6.3 Exercise 6.4 Exercise 6.5 Exercise 6.6

Loading Data to Upper-Level Members . . . . . . . . . . . . . . . . . . . . . . . . . 13 Developing a Normalization Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Copying Rates and Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Allocating Other Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Optional: Creating a Multilevel Allocation. . . . . . . . . . . . . . . . . . . . . . . . 18 Creating Multiple-Database Calculations . . . . . . . . . . . . . . . . . . . . . . . . 20

a r O

e l c

Table of Contents

Exercise Solutions Lesson 3:

Developing Calculation Scripts

Solution 3.1 Testing Intelligent Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Solution 3.2 Comparing FIX and IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Solution 3.3 Testing Calculation Member Block Syntax . . . . . . . . . . . . . . . . . . . . . . . 26 Testing Units as Anchor Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Testing List Price as Anchor Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Testing Sep as Anchor Member. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Testing O-IBM as Anchor Member. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Testing Forecast as Anchor Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Lesson 4:

Developing Advanced Calculations

Solution 4.1 Creating Complex Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Solution 4.2 Creating a Baseline Forecast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Solution 4.3 Creating a Working Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Creating Substitution Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Copying Data into the Working Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Solution 4.4 Creating Empty Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Solution 4.5 Calculating a Rolling Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Modifying the Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Creating a Rolling Average Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Copying the Formula to the Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

y m

e d a

Lesson 5:

e l c a r O ly & On l a e n r s e t U n I

c A

Calculating Dynamically

Solution 5.1 Eliminating Back Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Creating a Test Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Modifying the DynSales Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Modifying CalcAll.csc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Resetting the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Adding a Connection in Smart View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Testing Dynamic Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Solution 5.2 Optimizing with Dynamic Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Modifying the DynSales Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

e l c

a r O iv

Essbase Analytics Calculate Databases

Table of Contents

Lesson 6:

Normalizing Data

Solution 6.1 Loading Data to Upper-Level Members . . . . . . . . . . . . . . . . . . . . . . . . . 48 Creating the ClearAll Calculation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Loading and Calculating Multilevel Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Modifying the Calculation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Loading and Calculating Level 0 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Modifying the Calculation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Solution 6.2 Developing a Normalization Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Solution 6.3 Copying Rates and Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Solution 6.4 Allocating Other Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Modifying the Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Testing the Calculation Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Solution 6.5 Optional: Creating a Multilevel Allocation. . . . . . . . . . . . . . . . . . . . . . . . 57 Solution 6.6 Creating Multiple-Database Calculations . . . . . . . . . . . . . . . . . . . . . . . . 60 Creating a Location Alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Calculating Across Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

v

Table of Contents

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O vi

Essbase Analytics Calculate Databases

Exercises

Overview This section contains hands-on exercises that you will work on throughout this course. Exercises are grouped by lesson. Your instructor may choose to perform some exercises with you in demonstration format. Therefore, you may not be required to complete all exercises. It is, however, important that you complete all exercises as requested by the instructor, as many exercises build upon other exercises. There are no exercises for the following lessons:

y m

• Essbase Overview

e d a

• Calculation Overview

Lesson 1

e l c a r O ly & On l a e n r s e t U n I

Lesson 2

a r O

e l c

c A

Lesson 3 Developing Calculation Scripts Exercises

Lesson 3

Developing Calculation Scripts

Exercise 3.1

Testing Intelligent Calculation

In this exercise, you test the behavior of intelligent calculation. 1. In Administration Services Console, open IntCalc.csc. 2. Review the calculation script. 3. If necessary, run ResetData.bat to clear and reload data. 4. Execute IntCalc.csc. 5. Open BasicCalcs.xls (located in c:\CF\EssCalcs\Calcs). 6. Select the IntelligentCalc worksheet. 7. Refresh the worksheet. 8. Notice the incorrect results in Qtr 1 for the accounts highlighted in blue.

y m

9. Modify IntCalc.csc to accomplish the following tasks: • Execute the back-calculation section of the script.

e d a

• Mark calculated data blocks clean at the end of the calculation process. 10. Save IntCalc.csc. 11. Repeat steps 3 through 7 to test your calculation results.

Exercise 3.2

e l c a r O ly & On l a e n r s e t U n I

c A

Comparing FIX and IF

Bigcorp forecast analysts want to assign list prices to products in each product line. In this exercise, you compare the calculation performance of two calculation scripts: one that assigns values using FIX statements and another that assigns values using IF statements. 1. Run ResetData.bat to clear and reload data.

2. In BasicCalcs.xls, select the SubmitPrices worksheet.

e l c

3. Click

(refresh).

4. Execute PriceFIX.csc.

a r O

5. On the Fix vs If worksheet, view the calculation results.

2

Essbase Analytics Calculate Databases

Lesson 3 Developing Calculation Scripts Exercises 6. In Administration Services Console, open the BigCalc application log. 7. Scroll to the bottom of the application log and record the time required to run PriceFIX.csc. 8. Repeat steps 1 through 6 to test PriceIF.csc.

Exercise 3.3

Testing Calculation Member Block Syntax

A calculation script created for Bigcorp forecast analysts contains a conditional statement. In this exercise, you test different anchor members for the calculation member block. 1. In Administration Services Console, open CalcMem.csc. 2. Review the calculation script. Notice that Units is the anchor member for the calculation member block. 3. Run ResetData.bat to clear and reload data. 4. Execute CalcMem.csc.

y m

5. In BasicCalcs.xls, select the CalcMember worksheet. 6. Click

e d a

(refresh).

7. Notice the calculation results from using Units as the anchor member for the calculation member block.

c A

8. In CalcMem.csc, make List Price the anchor member for the calculation member block.

e l c a r O ly & On l a e n r s e t U n I

9. Save CalcMem.csc.

10. Repeat steps 4 through 7 to test the new anchor member.

11. Repeat steps 8 through 10 to test the following anchor members: • Sep • O-IBM • Forecast

e l c

a r O

Essbase Analytics Calculate Databases

3

Lesson 4 Developing Advanced Calculations Exercises

Lesson 4

Developing Advanced Calculations

Exercise 4.1

Creating Complex Conditionals

Bigcorp forecast analysts want to assign discount percentages to customers based on the number of forecasted units. The percentages must also differ by sales channel. 1. Create a script based on the information in the following table: Forecasted Units

Forecasted Discount Percentage

Less than 300

• OEM customers: 6% • Retail customers: 4.5% • Distributor customers: 5.5%

Between 300 and 499

• OEM customers: 10% • Retail customers: 7% • Distributor customers: 9%

500 and over

• OEM customers: 15%

y m

• Retail customers: 12%

e d a

• Distributor customers: 13%

2. Save the script as DiscFcst.csc. 3. Run ResetData.bat to clear and reload data.

e l c a r O ly & On l a e n r s e t U n I

4. Execute DiscFcst.csc.

c A

5. Open AdvancedCalcs.xls (located in c:\CF\EssCalcs\Calcs). 6. Select Hyperion > Options.

7. On the Display tab, replace #MISSING with 0. 8. Select the Discount% worksheet. 9. Refresh the worksheet.

e l c

a r O 4

Essbase Analytics Calculate Databases

Lesson 4 Developing Advanced Calculations Exercises 10. Compare your results to the following figure:

y m

e d a

Exercise 4.2

e l c a r O ly & On l a e n r s e t U n I

c A

Creating a Baseline Forecast

Bigcorp forecast analysts have already created forecasts for May through August. They want to create a baseline forecast for the remaining months of the year from existing actual data. 1. Create a script that accomplishes the following tasks:

a. Copies Sep through Dec prior year actual data to the Forecast scenario b. Increases Sep through Dec forecast prices by 10%

e l c

2. Save the script as BaseFcst.csc.

a r O

3. Run ResetData.bat to clear and reload data. 4. Execute BaseFcst.csc.

Essbase Analytics Calculate Databases

5

Lesson 4 Developing Advanced Calculations Exercises 5. In AdvancedCalcs.xls, select the Forecast worksheet. 6. Refresh the worksheet. 7. Compare your results to the following figures:

y m

e d a

Exercise 4.3

e l c a r O ly & On l a e n r s e t U n I

c A

Creating a Working Scenario

Each month Bigcorp forecast analysts require a working scenario that displays actual data from January through the prior month and forecast data from the current month through December.

e l c

a r O 6

Essbase Analytics Calculate Databases

Lesson 4 Developing Advanced Calculations Exercises Complete the following tasks to facilitate the required analysis: 1. Create the following substitution variables: • CurrentMonth: May • PriorMonth: Apr 2. Create a script that copies data into the Working scenario based on the following table: Scenario

Months

Current Year

Jan through prior month

Forecast

Current month through Dec

3. Save the script as Working.csc. 4. Execute Working.csc. NOTE

The results of this calculation depend on forecast data created by the BaseFcst calculation script. If you run ResetData.bat to clear and reload data, be sure to calculate BaseFcst.csc before calculating Working.csc.

y m

5. In AdvancedCalcs.xls, select the Working worksheet. 6. Refresh the worksheet.

e l c a r O ly & On l a e n r s e t U n I

7. Compare your results to the following figure:

e l c

e d a

c A

a r O

Essbase Analytics Calculate Databases

7

Lesson 4 Developing Advanced Calculations Exercises

Exercise 4.4

Creating Empty Blocks

Bigcorp budget analysts want to create a budget for all product-customer combinations for which there was actual data in the prior year. To facilitate the budgeting process, you must first create the appropriate target blocks, and then clear them of data without removing them from the database. 1. Run ResetData.bat to clear and reload input data. 2. In Administration Services Console, for BigCalc Sales, open the Database Properties dialog box. 3. Select the Statistics tab. 4. Record the number of existing data blocks. 5. Create a calculation script that accomplishes the following tasks: • Copies data from the Prior Year scenario to the Budget scenario • Clears data from Budget blocks without removing them from the database 6. Save the script as EmptyBud.csc.

y m

7. Execute EmptyBud.csc.

e d a

8. Return to the Database Properties dialog box and refresh the database statistics. 9. Record the number of existing data blocks after calculating EmptyBud.csc. There are more data blocks after the calculation.

Exercise 4.5

e l c a r O ly & On l a e n r s e t U n I

c A

Calculating a Rolling Average

For unit sales, Bigcorp finance analysts require a six-month rolling average calculation that spans the Prior Year and Current Year scenarios. 1. Create a calculation script that calculates the account Rolling 6 Avg Units as the average of units for the current month and the prior five months. TIP

If you decide to use the @XRANGE function, you must make sure that your outline members are in chronological order.

e l c

2. Save the calculation script as RollAvg.csc.

a r O

3. Run ResetData.bat to clear and reload input data.

8

Essbase Analytics Calculate Databases

Lesson 4 Developing Advanced Calculations Exercises 4. Execute RollAvg.csc. 5. In AdvancedCalcs.xls, select the RollingAverage worksheet. 6. Refresh the worksheet. 7. Compare your results to the following figure:

y m

e d a

e l c a r O ly & On l a e n r s e t U n I

c A

8. Copy the formula for Rolling 6 Avg Units from the calculation script into the outline formula editor for Rolling 6 Avg Units. 9. Save the Sales outline. If prompted, discard all data.

e l c

a r O

Essbase Analytics Calculate Databases

9

Lesson 5 Calculating Dynamically Exercises

Lesson 5

Calculating Dynamically

Exercise 5.1

Eliminating Back Calculation

You want to improve calculation performance in the BigCalc Sales database. Because back calculation can more than double the time required to run a calculation script, eliminating back calculation can significantly improve your calculation performance. 1. Review the CalcAll calculation script: /* Housekeeping */ SET UPDATECALC OFF; SET AGGMISSG ON; SET MSG SUMMARY; /* Main Rollup */ CALC DIM (Accounts, "Year Tot", Customer, Product);

y m

/* Back Calculation */ ( "List Price" = "Gross Sales" / Units; "Discount %" = Discounts / "Gross Sales"; "Labor/Unit" = "Direct Labor" / Units; "Matl/Unit" = Material / Units; "Overhead Rate" =Overhead / "Direct Labor"; "Gross Margin %"; )

e l c a r O ly & On l a e n r s e t U n I

e d a

c A

2. In Administration Services Console, create a copy of the BigCalc application called DynCalc. 3. Rename the DynCalc Sales database DynSales.

4. Revise the Sales outline in such a way that the back-calculation section of the CalcAll script is no longer necessary. NOTE

e l c

There are many possible solutions for this exercise.

a r O

5. Open Dynamic.xls (located in c:\CF\EssCalcs\Dynamic).

10

Essbase Analytics Calculate Databases

Lesson 5 Calculating Dynamically Exercises 6. As you add new members to your outline, use the ShadowRates worksheet as a guide for what names to use. Modifying CalcAll.csc 1. Open CalcAll.csc. 2. Save CalcAll.csc as CalcDyn.csc. 3. Remove the back-calculation section of the script. 4. Save CalcDyn.csc. Testing Dynamic Calculations 1. Run ResetDynamic.bat (located in c:\CF\EssCalcs\Scripts). 2. In Dynamic.xls, open Connection Manager. 3. Create a connection to the DynCalc DynSales database called DynSales. 4. Select the ShadowRates worksheet.

y m

5. Set DynSales as your active connection. 6. Refresh the worksheet. Compare your results to the following figure:

e l c

e l c a r O ly & On l a e n r s e t U n I

e d a

c A

a r O

Essbase Analytics Calculate Databases

11

Lesson 5 Calculating Dynamically Exercises 7. In the Comparison section of the worksheet, verify your calculation results. Your results should match the following figure:

y m

e d a

Exercise 5.2

e l c a r O ly & On l a e n r s e t U n I

c A

Optimizing with Dynamic Calculations

You want to optimize your data block size by dynamically calculating dense calculations. In this exercise, you apply dynamic calculations wherever appropriate to members of dense dimensions and test your calculation results. There are many possible solutions for this exercise. 1. Modify the DynSales outline by using Dynamic Calc storage wherever possible in dense dimensions. TIP

Consider using two-pass calculation or changing dimension configurations in order to produce correct results.

e l c

a r O

2. Run ResetDynamic.bat to clear, reload, and calculate data. 3. In Dynamic.xls, use the Aggressive worksheet to check your calculation results.

12

Essbase Analytics Calculate Databases

Lesson 6 Normalizing Data Exercises

Lesson 6

Normalizing Data

Exercise 6.1

Loading Data to Upper-Level Members

The Bigcorp management team wants to load current year Other CGS measures to the total of all products and all customers, rather than deriving and loading level 0 data. In this exercise, you use the Bigcalc Sales database to test the loading of upper-level data and modify CalcAll.csc, as necessary, to return correct calculation results at all levels. As a reminder, the calculation test procedure contains the following steps: 1. Clear all data from the database. 2. Load test data. 3. Calculate the database. 4. Audit calculation results. Create a calculation script that clears all data in the database.

y m

The Multilevel Input and Level 0 Input worksheets in AdvancedCalcs.xls represent two approaches to loading Other CGS. Follow the calculation test procedure to accomplish the following tasks:

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

13

Lesson 6 Normalizing Data Exercises • Load and calculate the data presented on the Multilevel Input and Multilevel AuditSheet worksheets in UpperLevel.xls. Use CalcAll.csc as a starting point, and save the modified script as CYMulti.csc. Your results for “Family Total”->”Channel Total” should match the following figure:

y m

• Load and calculate the data presented on the Level 0 Input and Level 0 AuditSheet worksheets in UpperLevel.xls. Use CalcAll.csc as a starting point, and save the modified script as CYLev0.csc. Your results for “Family Total”->”Channel Total” should match the following figure:

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O 14

Essbase Analytics Calculate Databases

Lesson 6 Normalizing Data Exercises

Exercise 6.2

Developing a Normalization Table

Bigcorp budget analysts want to load budget data to upper-level members. You must create a complex script for budget data. Before creating your script, you plan the normalization process based on sample input data. 1. Open Budget.xls. 2. Select the Normalization worksheet. 3. Based on the input sheets in Budget.xls, complete the normalization table.

Exercise 6.3

Copying Rates and Drivers

Based on the input data in Budget.xls and the normalization table you developed in the preceding exercise, you create a script to normalize rates and drivers. 1. Modify CalcDyn.csc to accomplish the following tasks: • Calculate only Budget data. • Copy level 0 units from the Current Year scenario. • Copy rates and drivers loaded to upper levels down to level 0 blocks.

e d a

2. Save the script as Budget.csc. 3. Run LoadBudget.bat to clear and reload input data. 4. In Budget.xls, select the AuditCalcs worksheet.

e l c a r O ly & On l a e n r s e t U n I

5. Set DynCalc as the active connection.

y m

c A

6. Calculate Budget.csc.

e l c

a r O

Essbase Analytics Calculate Databases

15

Lesson 6 Normalizing Data Exercises 7. Refresh the worksheet. Compare your results to the following figure:

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O 16

Essbase Analytics Calculate Databases

Lesson 6 Normalizing Data Exercises

Exercise 6.4

Allocating Other Costs

In this exercise, you complete the budget calculation by adding a section to allocate other costs. 1. Open Budget.csc. 2. Add a section to the normalization process that allocates other costs based on the following criteria: Accounts

Allocation Basis

Material Variances

% of Units

Labor Variances

% of Units

Overhead Variances

% of Units

Obsolete Charges

% of Sales

Inventory Adjustments

% of Sales

3. Keep the following points in mind:

y m

• The allocation base must be aggregated before the ratios are calculated.

• Calculations for stored members should not be dependent on Dynamic Calc members. If they are, consider changing the Dynamic Calc members to stored members. 4. Save Budget.csc.

e l c a r O ly & On l a e n r s e t U n I

5. Run LoadBudget.bat to clear and reload input data.

e d a

c A

6. In Budget.xls, select the AuditCalcs worksheet. 7. Set DynCalc as the active connection. 8. Calculate Budget.csc.

e l c

a r O

Essbase Analytics Calculate Databases

17

Lesson 6 Normalizing Data Exercises 9. Refresh the worksheet. Compare your results to the following figure:

y m

e d a

Exercise 6.5

e l c a r O ly & On l a e n r s e t U n I

c A

Optional: Creating a Multilevel Allocation

Bigcorp budget analysts changed the business logic for the allocation of Labor Variances. In this exercise, you create a multilevel allocation for Labor Variances. 1. Save Budget.csc as BudgetB.csc.

e l c

2. Modify the allocation for Labor Variances to complete the following calculation steps: a. Allocate data to the children of Family Total based on an even split between the children that have data.

a r O 18

Essbase Analytics Calculate Databases

Lesson 6 Normalizing Data Exercises b. Allocate data from the children of Family Total down to level 0 members based on percentage of total units in the respective product family. 3. Save BudgetB.csc. 4. Run LoadBudget.bat to clear and reload input data. 5. In Budget.xls, select the AuditCalcs worksheet. 6. Set DynCalc as the active connection. 7. Calculate Budget.csc. 8. Refresh the worksheet. Compare your results to the following screen shot:

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

19

Lesson 6 Normalizing Data Exercises

Exercise 6.6

Creating Multiple-Database Calculations

Bigcorp tax analysts maintain a separate database, BigTax Taxes, to store tax rates and other tax-related information. Bigcorp forecast analysts want to calculate projected tax based on the gross margin stored in DynSales and the U.S. tax rate stored in BigTax Taxes. 1. In the DynCalc DynSales database, create a location alias for BigTax Taxes. 2. Name the location alias Taxes. 3. Create a calculation script for the Projected Taxes account that accomplishes the following tasks: • Turns intelligent calculation off • Calculates Projected Tax for all scenarios as gross margin times the current US tax rate stored in the TR0003 account in BigTax Taxes 4. Save the script as Taxes.csc. 5. Run ResetDynamic.bat to clear, reload, and calculate input data.

y m

6. Open Taxes.xls (located in c:\CF\EssCalcs\Normalize). 7. Select the ProjectedTax worksheet.

e d a

8. Set DynCalc as the active connection. 9. Calculate Taxes.csc. 10. Refresh the worksheet.

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O 20

Essbase Analytics Calculate Databases

Lesson 6 Normalizing Data Exercises 11. Compare your results to the following figure:

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

21

Lesson 6 Normalizing Data Exercises

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O 22

Essbase Analytics Calculate Databases

Exercise Solutions

Overview This section contains step-by-step solutions to successfully complete all exercises. Solutions are grouped by lesson. There are no solutions for the following lessons: • Essbase Overview • Calculation Overview.

Lesson 1

y m

e d a

Lesson 2

a r O

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

Lesson 3 Developing Calculation Scripts Solutions

Lesson 3

Developing Calculation Scripts

Solution 3.1

Testing Intelligent Calculation

In this exercise, you test the behavior of intelligent calculation. 1. In Administration Services Console, expand the BigCalc application node. 2. Expand the Sales database node. 3. Expand the Calculations node. 4. Double-click IntCalc.csc. IntCalc.csc is displayed in Calculation Script Editor. 5. Review the calculation script. 6. In Windows Explorer, browse to c:\CF\EssCalcs\Scripts. 7. Double-click ResetData.bat to clear and reload data. 8. In Calculation Script Editor for IntCalc.csc, click

9. Open BasicCalcs.xls (located in c:\CF\EssCalcs\Calcs).

e d a

10. Select the IntelligentCalculation worksheet. 11. Click

y m

(execute script).

(refresh).

c A

12. Notice the incorrect results in Qtr 1 for the accounts highlighted in blue.

e l c a r O ly & On l a e n r s e t U n I

13. Modify the body of IntCalc.csc to match the following script: /* Housekeeping */ SET MSG SUMMARY; SET UPDATECALC OFF; /* Main Rollup */ CALC ALL;

/* Back Calculation */ ( "List Price" = "Gross Sales" / Units; "Discount %" = "Discounts" / "Gross Sales"; "Labor/Unit" = "Direct Labor" / Units; "Matl/Unit" = Material / Units; "Overhead Rate" = Overhead / "Direct Labor"; "Gross Margin %";

e l c

a r O 24

Essbase Analytics Calculate Databases

3 Developing Calculation Scripts Solutions ) /* Mark calculated data blocks clean */ SET CLEARUPDATESTATUS ONLY; ( "List Price" = "Gross Sales" / Units; "Discount %" = "Discounts" / "Gross Sales"; "Labor/Unit" = "Direct Labor" / Units; "Matl/Unit" = Material / Units; "Overhead Rate" = Overhead / "Direct Labor"; "Gross Margin %"; ) 14. Select File > Save. 15. Repeat steps 3 through 8 to test your calculation results.

Solution 3.2

Comparing FIX and IF

In this exercise, you compare the calculation performance of two calculation scripts: one that assigns values using FIX statements and another that assigns values using IF statements.

y m

e d a

1. Run ResetData.bat to clear and reload data. 2. In BasicCalcs.xls, select the SubmitPrices worksheet. 3. Click

(refresh).

e l c a r O ly & On l a e n r s e t U n I

4. Select Hyperion > Calculation Options > Calculate.

c A

The Calculation Scripts dialog box is displayed. 5. Select PriceFIX.csc. 6. Click Launch.

The message "PriceFIX was successful" is displayed. 7. Click OK.

8. Click Close to close the Calculation Scripts dialog box. 9. Select the Fix vs If worksheet.

e l c

10. Click

a r O

(refresh) to view the calculation results.

11. In Administration Services Console, right-click the BigCalc application node.

Essbase Analytics Calculate Databases

25

Lesson 3 Developing Calculation Scripts Solutions 12. Select View > Log. The Log View Options dialog box is displayed. 13. Select Starting date. 14. In the text box, enter today’s date. 15. Click OK. The BigCalc application log is displayed. 16. Scroll to the bottom of the application log and record the time required to run PriceFIX.csc. 17. Repeat steps 1 through 16 to test PriceIF.csc.

Solution 3.3

Testing Calculation Member Block Syntax

In this exercise, you test different anchor members for the calculation member block.

y m

Testing Units as Anchor Member 1. In Administration Services Console, open CalcMem.csc.

e d a

2. Review the calculation script. Notice that Units is the anchor member for the calculation member block. 3. Run ResetData.bat to clear and reload data.

e l c a r O ly & On l a e n r s e t U n I

4. Execute CalcMem.csc.

c A

5. In BasicCalcs.xls, select the CalcMember worksheet.

e l c

a r O 26

Essbase Analytics Calculate Databases

3 Developing Calculation Scripts Solutions 6. Click

(refresh).

Data is displayed for all calculated cells, as in the following figure:

Testing List Price as Anchor Member 1. In CalcMem.csc, replace the anchor member Units with List Price.

y m

2. Save CalcMem.csc.

e d a

3. Run ResetData.bat to clear and reload data. 4. Execute CalcMem.csc. 5. In BasicCalcs.xls, select the CalcMember worksheet. 6. Click

(refresh).

e l c a r O ly & On l a e n r s e t U n I

c A

Data is displayed for all calculated cells, as in the following figure:

e l c

a r O

Essbase Analytics Calculate Databases

27

Lesson 3 Developing Calculation Scripts Solutions Testing Sep as Anchor Member 1. In CalcMem.csc, replace the anchor member LIst Price with Sep. 2. Save CalcMem.csc. 3. Run ResetData.bat to clear and reload data. 4. Execute CalcMem.csc. 5. In BasicCalcs.xls, select the CalcMember worksheet. 6. Click

(refresh).

Calculated data is displayed only for September, as in the following figure:

y m

e d a

Testing O-IBM as Anchor Member

e l c a r O ly & On l a e n r s e t U n I

c A

1. In CalcMem.csc, replace the anchor member Sep with O-IBM. 2. Save CalcMem.csc.

3. Run ResetData.bat to clear and reload data. 4. Execute CalcMem.csc.

5. In BasicCalcs.xls, select the CalcMember worksheet.

e l c

a r O 28

Essbase Analytics Calculate Databases

3 Developing Calculation Scripts Solutions 6. Click

(refresh).

Calculated data is displayed only for O-IBM, as in the following figure:

Testing Forecast as Anchor Member 1. In CalcMem.csc, replace the anchor member O-IBM with Forecast.

y m

2. Save CalcMem.csc. 3. Run ResetData.bat to clear and reload data.

e d a

4. Execute CalcMem.csc.

c A

The calculation error message "Cannot calculate dimension member [Forecast] with restricted member [Forecast]" is displayed.

e l c

e l c a r O ly & On l a e n r s e t U n I

a r O

Essbase Analytics Calculate Databases

29

Lesson 4 Developing Advanced Calculations Solutions

Lesson 4

Developing Advanced Calculations

Solution 4.1

Creating Complex Conditionals

In this exercise, you create a set of conditional statements to assign values to Discount %. 1. Select File > Editors > Calculation Script Editor. 2. Create the following calculation script: /* Housekeeping */ SET UPDATECALC OFF; /* Baseline Fix */ FIX ("Forecast") /* Assign values to Discount % */ "Discount %" ( IF (Units < 300) IF (@ISCHILD ("OEM")) "Discount %" = .06; ELSEIF (@ISCHILD ("Retail")) "Discount %" = .045; ELSEIF (@ISCHILD ("Distributor")) "Discount %" = .055; ENDIF ELSEIF (Units >= 300 AND Units < 500) IF (@ISCHILD ("OEM")) "Discount %" = .10; ELSEIF (@ISCHILD ("Retail")) "Discount %" = .07; ELSEIF (@ISCHILD ("Distributor")) "Discount %" = .09; ENDIF ELSE IF (@ISCHILD ("OEM")) "Discount %" = .15; ELSEIF (@ISCHILD ("Retail")) "Discount %" = .12; ELSEIF (@ISCHILD ("Distributor")) "Discount %" = .13; ENDIF

e l c

e l c a r O ly & On l a e n r s e t U n I

y m

e d a

c A

a r O 30

Essbase Analytics Calculate Databases

4 Developing Advanced Calculations Solutions ENDIF ) /* Close out Baseline Fix */ ENDFIX 3. Save the script as DiscFcst.csc. 4. Run ResetData.bat to clear and reload data. 5. Execute DiscFcst.csc. 6. Open AdvancedCalcs.xls (located in c:\CF\EssCalcs\Calcs). 7. Select the Discount% worksheet. 8. Select Hyperion > Options. The Options dialog box is displayed. 9. Select the Display tab. 10. In the #NoData/Missing Label text box, type 0.

y m

11. Click OK. 12. Refresh the worksheet.

e l c

e l c a r O ly & On l a e n r s e t U n I

e d a

c A

a r O

Essbase Analytics Calculate Databases

31

Lesson 4 Developing Advanced Calculations Solutions 13. Compare your results to the following figure:

y m

e d a

Solution 4.2

e l c a r O ly & On l a e n r s e t U n I

c A

Creating a Baseline Forecast

In this exercise, you create a baseline forecast from existing actual data. 1. Create the following calculation script: /* Housekeeping */ SET UPDATECALC OFF; /* Baseline Fix */ FIX (Sep:Dec)

e l c

a r O 32

/* Copy Budget data to Forecast scenario */ DATACOPY "Prior Year" TO Forecast;

Essbase Analytics Calculate Databases

4 Developing Advanced Calculations Solutions /* Increase Forecast prices */ FIX ("List Price") Forecast = Forecast * 1.1; ENDFIX /* Close out the Baseline Fix */ ENDFIX 2. Save the script as BaseFcst.csc. 3. Run ResetData.bat to clear and reload data. 4. Execute BaseFcst.csc. 5. In AdvancedCalcs.xls, select the Forecast worksheet. 6. Compare your results to the following figures:

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

33

Lesson 4 Developing Advanced Calculations Solutions

Solution 4.3

Creating a Working Scenario

In this exercise, you create a working scenario from existing actual and forecast data. Creating Substitution Variables 1. In Administration Services Console, in the Enterprise View navigation panel, rightclick the localhost Essbase Server node. 2. Select Edit > Variables. The Substitution Variables dialog box is displayed. 3. In the first row, complete the following tasks, as shown in the following figure: • From the Application drop-down list, select BigCalc. • From the Database drop-down list, select Sales. • In the Variable text box, type CurrentMonth. • In the Value text box, type May. 4. Click Set. 5. Repeat steps 3 and 4 to create the variable PriorMonth with a value of Apr.

e d a

6. Click Close. Copying Data into the Working Scenario 1. Create the following calculation script:

e l c a r O ly & On l a e n r s e t U n I

y m

c A

/* Information

Before this calculation is executed, the baseline forecast must be created by running BaseFcst.csc. */ /* Housekeeping */ SET UPDATECALC OFF;

/* Copy actual data into the Working scenario */ FIX (Jan:&PriorMonth) DATACOPY "Current Year" TO "Working"; ENDFIX

e l c

a r O

/* Copy forecast data into the Working scenario */ FIX (&CurrentMonth:Dec)

34

Essbase Analytics Calculate Databases

4 Developing Advanced Calculations Solutions DATACOPY "Forecast" TO "Working"; ENDFIX 2. Save the script as Working.csc. 3. Execute Working.csc. NOTE

The results of this calculation depend on forecast data created by the BaseFcst calculation script. If you run ResetData.bat to clear and reload data, be sure to calculate BaseFcst.csc before calculating Working.csc. 4. In AdvancedCalcs.xls, select the Working worksheet. 5. Refresh the worksheet. 6. Compare your results to the following figure:

y m

e d a

Solution 4.4

e l c a r O ly & On l a e n r s e t U n I

c A

Creating Empty Blocks

In this exercise, you create data blocks and then clear them of data without removing them from the database. 1. Run ResetData.bat to clear and reload input data.

2. In Administration Services Console, right-click the BigCalc Sales database node.

e l c

3. Select Edit > Properties.

a r O

The Database Properties dialog box is displayed.

4. Select the Statistics tab.

Essbase Analytics Calculate Databases

35

Lesson 4 Developing Advanced Calculations Solutions 5. Record the number of existing data blocks. 6. Create the following calculation script: /* Information Assumptions: 1. Accounts and Year Tot are dense 2. Scenario, Customer, and Product are sparse */ /* Housekeeping */ SET UPDATECALC OFF; /* Copy data from Prior Year to Budget */ DATACOPY "Prior Year" TO "Budget"; /* Clear data from budget blocks */ FIX (@IDESCENDANTS ("Year Tot")) CLEARDATA "Budget"; ENDFIX 7. Save the calculation script as EmptyBud.csc.

y m

8. Execute EmptyBud.csc.

e d a

9. Select Organize > Database Properties. The Database Properties dialog box is displayed. 10. On the Statistics tab, click Refresh.

e l c a r O ly & On l a e n r s e t U n I

The database statistics are refreshed.

c A

11. Record the number of existing data blocks after calculating EmptyBud.csc. There are more data blocks after the calculation.

Solution 4.5

Calculating a Rolling Average

In this exercise, you create a six-month rolling average for unit sales. What follows is one of many possible solutions for this exercise.

e l c

Modifying the Outline

1. Open the BigCalc Sales outline.

a r O

2. Expand the Scenario dimension.

36

Essbase Analytics Calculate Databases

4 Developing Advanced Calculations Solutions 3. Right-click Prior Year. 4. Select Cut. 5. Right-click Scenario. 6. Select Paste child. The message "Are you sure you want to move the selected member" is displayed. 7. Click Yes. Prior Year and Current Year are displayed as the first and second children of Scenario, respectively. 8. Click Save. The Restructure Database Options dialog box is displayed. 9. Select Discard all data. 10. Click OK.

y m

Creating a Rolling Average Calculation

e d a

1. Create the following calculation script: /* Housekeeping */ SET UPDATECALC OFF;

c A

"Rolling 6 Avg Units" = @MOVAVG ( Units, 6, @XRANGE ("Prior Year"->Jan, "Current Year"->Dec) );

e l c a r O ly & On l a e n r s e t U n I

2. Save the calculation script as RollAvg.csc.

3. Run ResetData.bat to clear and reload input data. 4. Execute RollAvg.csc.

5. In AdvancedCalcs.xls, select the RollingAverage worksheet.

e l c

6. Refresh the worksheet.

a r O

Essbase Analytics Calculate Databases

37

Lesson 4 Developing Advanced Calculations Solutions 7. Compare your results to the following figure:

y m

e d a

Copying the For mula to the Outline

e l c a r O ly & On l a e n r s e t U n I

c A

1. In RollAvg.csc, select the formula for Rolling 6 Avg Units (select only the script to the right of the equal sign). 2. Right-click the selected text. 3. Select Copy.

4. In the BigCalc Sales outline, right-click Rolling 6 Avg Sales. 5. Select Edit member properties.

The Member Properties dialog box is displayed. 6. Select the Formula tab.

e l c

7. In the formula text box, right-click. 8. Select Paste.

a r O 38

Essbase Analytics Calculate Databases

4 Developing Advanced Calculations Solutions 9. Click Verify. The message "Formula verified successfully. No syntax errors detected." is displayed. 10. Click OK. 11. Click OK to close the Member Properties dialog box. 12. Save the Sales outline. If prompted, discard all data.

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

39

Lesson 5 Calculating Dynamically Solutions

Lesson 5

Calculating Dynamically

Solution 5.1

Eliminating Back Calculation

In this exercise, you modify the Sales outline to eliminate the back-calculation section of the CalcAll calculation script. Creating a Test Application 1. In Administration Services Console, right-click the BigCalc application node. 2. Select Copy. The Copy Application dialog box is displayed. 3. In the Application Name text box, type DynCalc. 4. Click OK. The DynCalc application node is added to the navigation panel.

y m

5. Expand the DynCalc application node.

e d a

6. Right-click the DynCalc Sales database node. 7. Select Rename. The Rename Database dialog box is displayed.

e l c a r O ly & On l a e n r s e t U n I

8. In the “Rename to” text box, type DynSales. 9. Click OK.

c A

The Sales database is renamed DynSales. Modifying the DynSales Outline

1. Double-click the DynSales outline node. Outline Editor is opened.

2. In the Accounts dimension, move the following members into the Input branch: • List Price

e l c

• Discount %

a r O

• Labor/Unit • Matl/Unit

• Overhead Rate

40

Essbase Analytics Calculate Databases

5 Calculating Dynamically Solutions 3. Change the consolidation property for the members moved in step 2 to ^ (never consolidate). 4. Add the following shadow rates to the outline: Member

Parent

Properties

Member Formula

Avg List Price

Gross Sales

~

“Gross Sales” / Units;

Avg Disc %

Discounts

~

Discounts / “Gross Sales”

Expense Reporting Avg Labor/Unit

Direct Labor

~

“Direct Labor” / Units;

Expense Reporting Avg Matl/Unit

Material

~

Material / Units;

Expense Reporting Avg OH Rate

Overhead

~

“Overhead” / “Direct Labor”;

Expense Reporting

5. Modify outline members based on the following table: Member

Parent

Property

Member Formula

Gross Sales

Net Sales

+

Units * “List Price”;

Units

Gross Sales

~

Discounts

Net Sales

-

Gross Sales (shared)

Discounts

~

Direct Labor

Cost of Sales

+

Units (shared)

Direct Labor

~

Material

Cost of Sales

+

Units (shared)

Material

~

Overhead

Cost of Sales

+

Overhead

~

e d a

c A

“Gross Sales” * “Discount %”;

e l c a r O ly & On l a e n r s e t U n I

Direct Labor (shared)

y m

“Labor/Unit” * Units;

“Matl/Unit” * Units;

“Direct Labor” * “Overhead Rate”

6. Change the following members to Dynamic Calc: • Avg List Price

e l c

• Avg Disc %

a r O

• Avg Labor/Unit • Avg Matl/Unit

Essbase Analytics Calculate Databases

41

Lesson 5 Calculating Dynamically Solutions • Avg OH Rate • Gross Margin % 7. Compare your completed outline to the following figures: Gross Margin accounts:

y m

e d a

Input accounts

8. Click Save.

e l c a r O ly & On l a e n r s e t U n I

c A

9. If prompted to restructure data, select Discard all data. Modifying CalcAll.csc

e l c

1. Open CalcAll.csc.

2. Save CalcAll.csc as CalcDyn.csc.

a r O

3. Remove the back-calculation section of the script.

42

Essbase Analytics Calculate Databases

5 Calculating Dynamically Solutions 4. Verify CalcDyn.csc. 5. Save CalcDyn.csc. Resetting the Database 1. In Windows Explorer, browse to c:\CF\EssCalcs\Scripts. 2. Double-click ResetDynamic.bat. A script clears, reloads, and calculates the BigCalc Sales and DynCalc DynSales databases. Adding a Connection in Smar t View 1. Open Dynamic.xls. 2. Select the ShadowRates worksheet. 3. Click

(connection manager).

The Connection Manager dialog box is displayed.

y m

4. Click Add. 5. Select URL Provider.

e d a

The Provider Type/URL dialog box is displayed. 6. For Provider, select Hyperion Provider. 7. For Location, select http://localhost:13080/aps/APS. 8. Click Next.

e l c a r O ly & On l a e n r s e t U n I

c A

The Application/Cube dialog box is displayed. 9. Expand the Servers node.

10. Expand the localhost node.

The Connect to Data Source dialog box is displayed. 11. For user name, type trnadmin. 12. For password, type hyperion.

e l c

13. Click Connect.

a r O

The available applications are displayed under the localhost server node.

14. Expand the DynCalc application node.

Essbase Analytics Calculate Databases

43

Lesson 5 Calculating Dynamically Solutions 15. Select the DynSales database node. 16. Click Next. The Name/Description dialog box is displayed. 17. For name, type DynSales. 18. For description, type BigCalc Dynamic Calc Test. 19. Click Finish. DynSales is added to the list of available connections in Connection Manager. 20. Select the DynSales connection. 21. Click Connect. The Connect to Data Source dialog box is displayed. 22. Enter your user name and password. 23. Click Connect. 24. Click Close to close Connection Manager.

y m

25. Select Hyperion > Active Connections > DynSales.

e d a

Testing Dynamic Calculations 1. Run ResetDynamic.bat to clear, reload, and calculate data. 2. Refresh the ShadowRates worksheet.

e l c a r O ly & On l a e n r s e t U n I

c A

3. In the Comparison section of the worksheet, verify your calculation results.

e l c

a r O 44

Essbase Analytics Calculate Databases

5 Calculating Dynamically Solutions 4. Compare your calculation results to the following figure:

y m

Solution 5.2

c A

Optimizing with Dynamic Calculations

e l c a r O ly & On l a e n r s e t U n I

e d a

In this exercise, you apply dynamic calculations wherever appropriate to members of dense dimensions and test your calculation results. What follows is one of many possible solutions for this exercise. Modifying the DynSales Outline

1. In the DynSales outline, make the following members of the Year Tot dimension Dynamic Calc: • Year Tot • Qtr 1

e l c

• Qtr 2

a r O

• Qtr 3 • Qtr 4

Essbase Analytics Calculate Databases

45

Lesson 5 Calculating Dynamically Solutions 2. Make the following accounts Dynamic Calc: • Gross Margin • Net Sales • Cost of Sales • Other CGS 3. Make the following accounts Dynamic Calc and flagged for two-pass calculation: • Avg List Price • Avg Disc % • Avg Labor/Unit • Avg Matl/Unit • Avg OH Rate • Gross Margin % • Unit Mix by Cust

y m

• Unit Mix

e d a

• Sales $ Mix • Rolling 6 Avg Units

c A

4. Make the following scenarios Dynamic Calc and flagged for two-pass calculation: • Act Vs Bud • Act Vs Fcst • Bud Vs Fcst

e l c a r O ly & On l a e n r s e t U n I

5. Select the Outline Properties tab.

6. Under Data storage, for Scenario, select Dense. 7. Save the DynSales outline.

8. If prompted to restructure data, select Discard all data.

9. Run ResetDynamic.bat to clear, reload, and calculate data.

e l c

10. In Dynamic.xls, select the Aggressive worksheet. 11. Set DynSales as the active connection.

a r O

12. Refresh the Aggressive worksheet.

46

Essbase Analytics Calculate Databases

5 Calculating Dynamically Solutions 13. In the Comparison section of the worksheet, verify your calculation results.

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

47

Lesson 6 Normalizing Data Solutions

Lesson 6

Normalizing Data

Solution 6.1

Loading Data to Upper-Level Members

In this exercise, you test the process of loading data to upper-level members and the effect of upper-level data loading on calculations. Creating the ClearAll Calculation Script 1. In Administration Services Console, select File > Editors > Calculation Script Editor. 2. Create the following script: CLEARBLOCK ALL; 3. Click

(validate).

The message "Syntax check was successful." is displayed. 4. Click OK.

y m

5. Save the calculation script as ClearAll.csc.

e d a

Loading and Calculating Multilevel Inputs

c A

1. Open UpperLevel.xls (located in c:\CF\EssCalcs\Calcs\Normalize). 2. Select the Multilevel Input worksheet.

e l c a r O ly & On l a e n r s e t U n I

3. Connect to DynSales.

4. Set DynSales as the active connection. 5. Calculate ClearAll.csc.

6. Refresh the worksheet

Input data is sent to DynCalc DynSales. 7. Select the Multilevel AuditSheet worksheet.

8. Refresh the worksheet to see the loaded data.

9. Scroll down to the orange Channel Total section, and verify upper-level loads.

e l c

10. Calculate CalcDyn.csc.

a r O 48

Essbase Analytics Calculate Databases

6 Normalizing Data Solutions 11. Refresh the worksheet. The message "Calculation Errors" is displayed. 12. Examine the Comparison formulas section, and determine where calculated data is incorrect. Gross Margin for the intersection of Channel Total and Family Total is incorrect. Qtr 1 is also incorrect. Modifying the Calculation Script 1. In Administration Services Console, expand the DynSales database node. 2. Expand the Calculation Scripts node. 3. Double-click CalcDyn. The Calculation Script Editor window is displayed. 4. Select File > Save as. 5. Save the script as CYMulti.csc.

y m

6. Modify the script to perform the following tasks:

e d a

• Set aggregate missing values to OFF. • Calculate only Current Year data.

c A

• Recalculate Gross Margin, after all dimensions are consolidated.

e l c a r O ly & On l a e n r s e t U n I

7. Compare your results to the following script: /* Information

Created by: YourName Created On:9/22/2005 Purpose: This script consolidates the DynCalc DynSales database in Current Year and then recalculates Gross Margin to offset upper-level data loads. */ /* Housekeeping */ SET UPDATECALC OFF; SET AGGMISSG OFF;

e l c

/* Baseline Fix */ FIX ("Current Year")

a r O

/* Main Rollup */

Essbase Analytics Calculate Databases

49

Lesson 6 Normalizing Data Solutions CALC DIM (Accounts, "Year Tot", Customer, Product); /* The Back Calculation */ ( "Gross Margin"; ) /* Close out the Baseline Fix */ ENDFIX 8. Repeat the steps described in “Loading and Calculating Level 0 Inputs” on page 3-50 to test your calculation script. Loading and Calculating Level 0 Inputs 1. Select the Level 0 Input worksheet. 2. Set DynSales as the active connection. 3. Run ClearAll.csc. 4. Refresh the worksheet

y m

Input data is sent to DynCalc DynSales.

e d a

5. Select the Level 0 AuditSheet worksheet. 6. Run CalcDyn.csc. 7. Refresh the worksheet.

e l c a r O ly & On l a e n r s e t U n I

8. Examine the comparison formulas for errors.

c A

Modifying the Calculation Script

1. In Administration Services Console, open CalcDyn.csc. 2. Select File > Save as.

3. Save the script as CYLev0.csc.

4. Modify the script to perform the following tasks: • Set aggregate missing values to ON.

e l c

• Calculate only Current Year data.

a r O 50

Essbase Analytics Calculate Databases

6 Normalizing Data Solutions 5. Compare your results to the following script: /* Information Created by: YourName Created On: 9/22/2005 Purpose: This script consolidates the Bigcorp Sales database in Current Year and then recalculates Gross Margin to offset upper-level data loads. */ /* Housekeeping */ SET UPDATECALC OFF; SET AGGMISSG ON; SET MSG SUMMARY; /* Baseline Fix */ FIX ("Current Year") /* Main Rollup */ CALC DIM (Accounts, "Year Tot", Customer, Product);

y m

/* Close out the Baseline Fix */ ENDFIX

e d a

6. Repeat the steps in “Loading and Calculating Level 0 Inputs” on page 3-50 to test your calculation script.

Solution 6.2

e l c a r O ly & On l a e n r s e t U n I Developing a Normalization Table

c A

In this exercise, you create a normalization table. 1. Open Budget.xls.

2. Select the Normalization worksheet.

3. Based on the input sheets in Budget.xls, complete the normalization table.

e l c

a r O

Essbase Analytics Calculate Databases

51

Lesson 6 Normalizing Data Solutions 4. Compare your results to the finished normalization table in the following figure:

Solution 6.3

y m

Copying Rates and Drivers

e d a

In this exercise, you create a script to normalize rates and drivers. 1. Open CalcDyn.csc. 2. Save CalcDyn.csc as Budget.csc. 3. Modify the Budget.csc to match the following script:

e l c a r O ly & On l a e n r s e t U n I

c A

/* Information

Created by: YourName Created On: 9/22/2005 Purpose: This script normalizes budget data in the DynCalc DynSales database. */ /* Housekeeping */ SET UPDATECALC OFF; SET AGGMISSG ON; SET MSG SUMMARY; /* Copy Current Year units to Budget */ FIX(@GENMBRS(Product, 5), @LEVMBRS(Customer, 0), Units) DATACOPY "Current Year" TO "Budget"; ENDFIX

e l c

a r O 52

Essbase Analytics Calculate Databases

6 Normalizing Data Solutions /* Baseline Fix */ FIX ("Budget") /* Normalization */ /* Normalize rates loaded to upper levels */ "List Price" = @PARENTVAL("Customer", "List Price"); "Discount %" = "Discount %"->"Family Total"; "Labor/Unit" = "Labor/Unit"->"Channel Total"; "Matl/Unit" = "Matl/Unit"->"Channel Total"; "Overhead Rate" = @MDANCESTVAL(2, "Product", 3, "Customer", 2); /* Main Rollup */ CALC DIM (Accounts, "Year Tot", Customer, Product); /* Close out the Baseline Fix */ ENDFIX 4. Save Budget.csc. 5. Run LoadBudget.bat to clear and reload input data.

y m

6. In Budget.xls, select the AuditCalcs worksheet.

e d a

7. Set DynCalc as the active connection. 8. Calculate Budget.csc.

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O

Essbase Analytics Calculate Databases

53

Lesson 6 Normalizing Data Solutions 9. Refresh the worksheet. Compare your results to the following figure:

y m

e d a

Solution 6.4

e l c a r O ly & On l a e n r s e t U n I

c A

Allocating Other Costs

In this exercise, you complete the budget calculation by adding a section to allocate other costs. 1. Open Budget.csc.

e l c

2. Modify Budget.csc to look like the following script: /* Information

a r O

Created by: YourName

54

Essbase Analytics Calculate Databases

6 Normalizing Data Solutions Created On:9/22/2005 Purpose: This script calculates the DynCalc DynSales database. /* /* Housekeeping */ SET UPDATECALC OFF; SET AGGMISSG ON; SET MSG SUMMARY; /* Copy Current Year units to Budget */ FIX(@GENMBRS(Product, 5), @LEVMBRS(Customer, 0), Units) DATACOPY "Current Year" TO "Budget"; ENDFIX /* Normalization */ /* Normalize rates loaded to upper levels */ "List Price" = @PARENTVAL("Customer", "List Price"); "Discount %" = "Discount %"->"Family Total"; "Labor/Unit" = "Labor/Unit"->"Channel Total"; "Matl/Unit" = "Matl/Unit"->"Channel Total"; "Overhead Rate" = @MDANCESTVAL(2, "Product", 3, "Customer", 2);

y m

e d a

/*Focused rollup for allocation of Other Expenses: calculate Net Sales, then sum Units and Net Sales across Product and Customer dimensions for members used as the allocation base.*/

e l c a r O ly & On l a e n r s e t U n I

@IDESCENDANTS ("Net Sales"); FIX ("Net Sales", Units) @IDESCENDANTS ("Family Total"); @IDESCENDANTS ("Channel Total"); ENDFIX

c A

/* Allocate Other CGS */

"Material Variances" = "Material Variances"->"Family Total"->"Channel Total" * "Units" / "Units"->"Family Total"->"Channel Total"; "Labor Variances" = "Labor Variances"->"Family Total"->"Channel Total" * "Units" / "Units"->"Family Total"->"Channel Total"; "Overhead Variances" = "Overhead Variances"->"Family Total"->"Channel Total" * "Units" / "Units"->"Family Total"->"Channel Total";

e l c

a r O

Essbase Analytics Calculate Databases

55

Lesson 6 Normalizing Data Solutions "Obsolete Charges" = "Obsolete Charges"->"Family Total"->"Channel Total" * "Net Sales" / "Net Sales"->"Family Total"->"Channel Total"; "Inventory Adjustments" = "Inventory Adjustments"->"Family Total"->"Channel Total" * "Net Sales" / "Net Sales"->"Family Total"->"Channel Total"; /* Main Rollup */ CALC DIM (Accounts, "Year Tot", Customer, Product); 3. Save Budget.csc. Modifying the Outline 1. In the DynSales outline, right-click Net Sales. 2. Select Edit member properties. The Member Properties dialog box is displayed.

y m

3. From the Data Storage drop-down box, select Store Data. 4. Click OK.

e d a

5. Click Save.

c A

The Restructure Database Options dialog box is displayed. 6. Select All data. 7. Click OK.

e l c a r O ly & On l a e n r s e t U n I

Testing the Calculation Script

1. Run LoadBudget.bat to clear and reload input data. 2. In Budget.xls, select the AuditCalcs worksheet. 3. Set DynCalc as the active connection. 4. Calculate Budget.csc.

e l c

a r O 56

Essbase Analytics Calculate Databases

6 Normalizing Data Solutions 5. Refresh the worksheet. Compare your results to the following figure:

y m

e d a

Solution 6.5

e l c a r O ly & On l a e n r s e t U n I

c A

Optional: Creating a Multilevel Allocation

In this exercise, you create a multilevel allocation for Labor Variances. 1. Save Budget.csc as BudgetB.csc.

2. Modify the allocation for Labor Variances to look like the following script:

e l c

/* Information

a r O

Created by: YourName Created On:9/22/2005

Essbase Analytics Calculate Databases

57

Lesson 6 Normalizing Data Solutions Purpose: This script calculates the DynCalc DynSales database. /* /* Housekeeping */ SET UPDATECALC OFF; SET AGGMISSG ON; SET MSG SUMMARY; /* Copy Current Year units to Budget */ FIX(@GENMBRS(Product, 5), @LEVMBRS(Customer, 0), Units) DATACOPY "Current Year" TO "Budget"; ENDFIX /* Normalization */ /* Normalize rates loaded to upper levels */ "List Price" = @PARENTVAL("Customer", "List Price"); "Discount %" = "Discount %"->"Family Total"; "Labor/Unit" = "Labor/Unit"->"Channel Total"; "Matl/Unit" = "Matl/Unit"->"Channel Total"; "Overhead Rate" = @MDANCESTVAL(2, "Product", 3, "Customer", 2);

y m

e d a

/*Focused rollup for allocation of Other Expenses: calculate Net Sales, then sum Units and Net Sales across Product and Customer dimensions for members used as the allocation base.*/ @IDESCENDANTS ("Net Sales"); FIX ("Net Sales", Units) @IDESCENDANTS ("Family Total"); @IDESCENDANTS ("Channel Total"); ENDFIX

e l c a r O ly & On l a e n r s e t U n I

c A

/* Allocate Other CGS */

"Material Variances" = "Material Variances"->"Family Total"->"Channel Total" * "Units" / "Units"->"Family Total"->"Channel Total"; "Overhead Variances" = "Overhead Variances"->"Family Total"->"Channel Total" * "Units" / "Units"->"Family Total"->"Channel Total";

e l c

/* Multilevel allocation for Labor Variances */ /* Step 1: Allocate Labor Variances to the children of Family Total based on an even split between the children with data */

a r O 58

Essbase Analytics Calculate Databases

6 Normalizing Data Solutions FIX( @CHILDREN( "Family Total")) "Labor Variances" = "Labor Variances"->"Family Total"->"Channel Total" / @COUNT( SKIPMISSING, @RANGE( Units, @ISIBLINGS( @CURRMBR(Product) ) ) ); ENDFIX /* Step 2: Allocate Labor Variances to Gen5 (level 0) products based on percent of product family units */ FIX( @GENMBRS( "Product", 5)) "Labor Variances" = @MDANCESTVAL( 2, "Product", 3, "Customer", 2, "Labor Variances") * ("Units" / @MDANCESTVAL( 2, "Product", 3, "Customer", 2, "Units")); ENDFIX

y m

e d a

/* Allocate Obsolete Charges and Inventory Adjustments based on percent of Net Sales */ "Obsolete Charges" = "Obsolete Charges"->"Family Total"->"Channel Total" * "Net Sales" / "Net Sales"->"Family Total"->"Channel Total"; "Inventory Adjustments" = "Inventory Adjustments"->"Family Total"->"Channel Total" * "Net Sales" / "Net Sales"->"Family Total"->"Channel Total";

e l c a r O ly & On l a e n r s e t U n I

c A

/* Main Rollup */

CALC DIM (Accounts, "Year Tot", Customer, Product); 3. Save BudgetB.csc.

4. Run LoadBudget.bat to clear and reload input data. 5. In Budget.xls, select the AuditCalcs worksheet.

e l c

6. Set DynCalc as the active connection.

a r O

7. Calculate Budget.csc.

Essbase Analytics Calculate Databases

59

Lesson 6 Normalizing Data Solutions 8. Refresh the worksheet. Compare your results to the following figure:

y m

e d a

Solution 6.6

e l c a r O ly & On l a e n r s e t U n I

c A

Creating Multiple-Database Calculations

In this exercise, you create a location alias to leverage data stored in another database. Creating a Location Alias

1. In Administration Services Console, right-click the DynSales database node.

e l c

2. Select Edit > Location aliases.

a r O 60

The Location Aliases dialog box is displayed.

Essbase Analytics Calculate Databases

6 Normalizing Data Solutions 3. In the first row of the table, create a location alias based on the following table: Parameter

Value

Alias

Taxes

Essbase Server

localhost

Application

BigTax

Database

Taxer

User Name

trnadmin

Password

hyperion

4. Click Test. A check mark is displayed in the Verified column. 5. Click Set. 6. Click Close.

y m

Calculating Across Databases 1. Create a calculation script for DynSales based on the following script: /* Housekeeping */ SET UPDATECALC OFF;

e d a

c A

/* Calculate Projected Tax */ "Projected Taxes" = "Gross Margin" * @XREF(Taxes, US, TR0003);

e l c a r O ly & On l a e n r s e t U n I

2. Save the script as Taxes.csc.

3. Run ResetDynamic.bat to clear, reload, and calculate input data. 4. Open Taxes.xls (located in c:\CF\EssCalcs\Normalize). 5. Select the ProjectedTax worksheet.

6. Set DynCalc as the active connection. 7. Calculate Taxes.csc.

8. Refresh the worksheet.

e l c

a r O

Essbase Analytics Calculate Databases

61

Lesson 6 Normalizing Data Solutions 9. Compare your results to the following figure:

y m

e d a

e l c

e l c a r O ly & On l a e n r s e t U n I

c A

a r O 62

Essbase Analytics Calculate Databases

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF