Essbase Calc Aguide

68

Click here to load reader

description

Essbase Calc guide

Transcript of Essbase Calc Aguide

  • Hyperion Essbase Analytics 9.3.1Calculate DatabasesActivity Guide

    D53220GC10

    Edition 1.0

    January 2008

    D53891

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Copyright 2008, Oracle. All rights reserved.

    Disclaimer

    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.

    Restricted Rights Notice

    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:

    U.S. GOVERNMENT RIGHTSThe U.S. Governments 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.

    Trademark Notice

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

    AuthorLisa Alexander

    Technical Contributors and ReviewersLucia CooperPaul HochBrian ODonnellStanley ZiolkowskiSteven Cranford

    EditorJessie Wood

    Graphic DesignerCarisa Cannan

    PublisherJudy Gaitan

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Table of Contents 0

    Exercises

    Lesson 3: Developing Calculation Scripts

    Exercise 3.1 Testing Intelligent Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Exercise 3.2 Comparing FIX and IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Exercise 3.3 Testing Calculation Member Block Syntax . . . . . . . . . . . . . . . . . . . . . . . . 3

    Lesson 4: Developing Advanced Calculations

    Exercise 4.1 Creating Complex Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Exercise 4.2 Creating a Baseline Forecast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Exercise 4.3 Creating a Working Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Exercise 4.4 Creating Empty Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Exercise 4.5 Calculating a Rolling Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    Lesson 5: Calculating Dynamically

    Exercise 5.1 Eliminating Back Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Modifying CalcAll.csc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Testing Dynamic Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    Exercise 5.2 Optimizing with Dynamic Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    Lesson 6: Normalizing Data

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Table of Contents

    iv Essbase Analytics Calculate Databases

    Exercise Solutions

    Lesson 3: Developing Calculation Scripts

    Solution 3.1 Testing Intelligent Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Solution 3.2 Comparing FIX and IF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Solution 3.3 Testing Calculation Member Block Syntax . . . . . . . . . . . . . . . . . . . . . . . 26

    Testing Units as Anchor Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Testing List Price as Anchor Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Testing Sep as Anchor Member. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Testing O-IBM as Anchor Member. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Testing Forecast as Anchor Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    Lesson 4: Developing Advanced Calculations

    Solution 4.1 Creating Complex Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Solution 4.2 Creating a Baseline Forecast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Solution 4.3 Creating a Working Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    Creating Substitution Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Copying Data into the Working Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    Solution 4.4 Creating Empty Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Solution 4.5 Calculating a Rolling Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    Modifying the Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Creating a Rolling Average Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Copying the Formula to the Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    Lesson 5: Calculating Dynamically

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

    Solution 5.2 Optimizing with Dynamic Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . 45Modifying the DynSales Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Table of Contents

    Essbase Analytics Calculate Databases v

    Lesson 6: Normalizing Data

    Solution 6.1 Loading Data to Upper-Level Members . . . . . . . . . . . . . . . . . . . . . . . . . 48Creating the ClearAll Calculation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Loading and Calculating Multilevel Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Modifying the Calculation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Loading and Calculating Level 0 Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Modifying the Calculation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    Solution 6.2 Developing a Normalization Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Solution 6.3 Copying Rates and Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Solution 6.4 Allocating Other Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    Modifying the Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Testing the Calculation Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

    Solution 6.5 Optional: Creating a Multilevel Allocation. . . . . . . . . . . . . . . . . . . . . . . . 57Solution 6.6 Creating Multiple-Database Calculations . . . . . . . . . . . . . . . . . . . . . . . . 60

    Creating a Location Alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Calculating Across Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Table of Contents

    vi Essbase Analytics Calculate Databases

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Exercises

    OverviewThis 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:

    Essbase Overview

    Calculation Overview

    Lesson 1

    Lesson 2

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 3 Developing Calculation ScriptsExercises

    2 Essbase Analytics Calculate Databases

    Lesson 3 Developing Calculation Scripts

    Exercise 3.1 Testing Intelligent CalculationIn 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.

    9. Modify IntCalc.csc to accomplish the following tasks:

    Execute the back-calculation section of the script.

    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 Comparing FIX and IFBigcorp 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.

    3. Click (refresh).

    4. Execute PriceFIX.csc.

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 3 Developing Calculation ScriptsExercises

    Essbase Analytics Calculate Databases 3

    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 SyntaxA 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.

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

    6. Click (refresh).

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

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

    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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsExercises

    4 Essbase Analytics Calculate Databases

    Lesson 4 Developing Advanced Calculations

    Exercise 4.1 Creating Complex ConditionalsBigcorp 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:

    2. Save the script as DiscFcst.csc.

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

    4. Execute DiscFcst.csc.

    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.

    Forecasted Units Forecasted Discount PercentageLess 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% Retail customers: 12% Distributor customers: 13%

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsExercises

    Essbase Analytics Calculate Databases 5

    10. Compare your results to the following figure:

    Exercise 4.2 Creating a Baseline ForecastBigcorp 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%

    2. Save the script as BaseFcst.csc.

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

    4. Execute BaseFcst.csc.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsExercises

    6 Essbase Analytics Calculate Databases

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

    6. Refresh the worksheet.

    7. Compare your results to the following figures:

    Exercise 4.3 Creating a Working ScenarioEach 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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsExercises

    Essbase Analytics Calculate Databases 7

    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:

    3. Save the script as Working.csc.

    4. Execute Working.csc.

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

    6. Refresh the worksheet.

    7. Compare your results to the following figure:

    Scenario MonthsCurrent Year Jan through prior month

    Forecast Current month through Dec

    N O T E

    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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsExercises

    8 Essbase Analytics Calculate Databases

    Exercise 4.4 Creating Empty BlocksBigcorp 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.

    7. Execute EmptyBud.csc.

    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 Calculating a Rolling AverageFor 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.

    2. Save the calculation script as RollAvg.csc.

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

    T I P

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsExercises

    Essbase Analytics Calculate Databases 9

    4. Execute RollAvg.csc.

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

    6. Refresh the worksheet.

    7. Compare your results to the following figure:

    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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 5 Calculating DynamicallyExercises

    10 Essbase Analytics Calculate Databases

    Lesson 5 Calculating Dynamically

    Exercise 5.1 Eliminating Back CalculationYou 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);

    /* 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 %";)

    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.

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

    N O T E

    There are many possible solutions for this exercise.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 5 Calculating DynamicallyExercises

    Essbase Analytics Calculate Databases 11

    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.

    5. Set DynSales as your active connection.

    6. Refresh the worksheet. Compare your results to the following figure:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 5 Calculating DynamicallyExercises

    12 Essbase Analytics Calculate Databases

    7. In the Comparison section of the worksheet, verify your calculation results. Your results should match the following figure:

    Exercise 5.2 Optimizing with Dynamic CalculationsYou 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.

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

    3. In Dynamic.xls, use the Aggressive worksheet to check your calculation results.

    T I P

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    Essbase Analytics Calculate Databases 13

    Lesson 6 Normalizing Data

    Exercise 6.1 Loading Data to Upper-Level MembersThe 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.

    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:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    14 Essbase Analytics Calculate Databases

    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:

    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:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    Essbase Analytics Calculate Databases 15

    Exercise 6.2 Developing a Normalization TableBigcorp 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 DriversBased 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.

    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.

    5. Set DynCalc as the active connection.

    6. Calculate Budget.csc.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    16 Essbase Analytics Calculate Databases

    7. Refresh the worksheet. Compare your results to the following figure:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    Essbase Analytics Calculate Databases 17

    Exercise 6.4 Allocating Other CostsIn 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:

    3. Keep the following points in mind:

    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.

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

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

    7. Set DynCalc as the active connection.

    8. Calculate Budget.csc.

    Accounts Allocation BasisMaterial Variances % of Units

    Labor Variances % of Units

    Overhead Variances % of Units

    Obsolete Charges % of Sales

    Inventory Adjustments % of Sales

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    18 Essbase Analytics Calculate Databases

    9. Refresh the worksheet. Compare your results to the following figure:

    Exercise 6.5 Optional: Creating a Multilevel AllocationBigcorp 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.

    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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    Essbase Analytics Calculate Databases 19

    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:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    20 Essbase Analytics Calculate Databases

    Exercise 6.6 Creating Multiple-Database CalculationsBigcorp 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.

    6. Open Taxes.xls (located in c:\CF\EssCalcs\Normalize).

    7. Select the ProjectedTax worksheet.

    8. Set DynCalc as the active connection.

    9. Calculate Taxes.csc.

    10. Refresh the worksheet.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    Essbase Analytics Calculate Databases 21

    11. Compare your results to the following figure:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataExercises

    22 Essbase Analytics Calculate Databases

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Exercise Solutions

    OverviewThis 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

    Lesson 2

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 3 Developing Calculation ScriptsSolutions

    24 Essbase Analytics Calculate Databases

    Lesson 3 Developing Calculation Scripts

    Solution 3.1 Testing Intelligent CalculationIn 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 (execute script).

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

    10. Select the IntelligentCalculation worksheet.

    11. Click (refresh).

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

    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 %";

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 3 Developing Calculation ScriptsSolutions

    Essbase Analytics Calculate Databases 25

    )

    /* 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 IFIn 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.

    3. Click (refresh).

    4. Select Hyperion > Calculation Options > Calculate.

    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.

    10. Click (refresh) to view the calculation results.

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 3 Developing Calculation ScriptsSolutions

    26 Essbase Analytics Calculate Databases

    12. Select View > Log.

    The Log View Options dialog box is displayed.

    13. Select Starting date.

    14. In the text box, enter todays 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 SyntaxIn this exercise, you test different anchor members for the calculation member block.

    Testing Units as Anchor Member

    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.

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 3 Developing Calculation ScriptsSolutions

    Essbase Analytics Calculate Databases 27

    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.

    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).

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 3 Developing Calculation ScriptsSolutions

    28 Essbase Analytics Calculate Databases

    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:

    Testing O-IBM as Anchor Member

    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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 3 Developing Calculation ScriptsSolutions

    Essbase Analytics Calculate Databases 29

    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.

    2. Save CalcMem.csc.

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

    4. Execute CalcMem.csc.

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsSolutions

    30 Essbase Analytics Calculate Databases

    Lesson 4 Developing Advanced Calculations

    Solution 4.1 Creating Complex ConditionalsIn 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;

    ENDIFELSEIF (Units >= 300 AND Units < 500)

    IF (@ISCHILD ("OEM"))"Discount %" = .10;

    ELSEIF (@ISCHILD ("Retail"))"Discount %" = .07;

    ELSEIF (@ISCHILD ("Distributor"))"Discount %" = .09;

    ENDIFELSE

    IF (@ISCHILD ("OEM"))"Discount %" = .15;

    ELSEIF (@ISCHILD ("Retail"))"Discount %" = .12;

    ELSEIF (@ISCHILD ("Distributor"))"Discount %" = .13;

    ENDIF

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 4 Developing Advanced CalculationsSolutions

    Essbase Analytics Calculate Databases 31

    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.

    11. Click OK.

    12. Refresh the worksheet.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsSolutions

    32 Essbase Analytics Calculate Databases

    13. Compare your results to the following figure:

    Solution 4.2 Creating a Baseline ForecastIn 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)

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 4 Developing Advanced CalculationsSolutions

    Essbase Analytics Calculate Databases 33

    /* 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:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsSolutions

    34 Essbase Analytics Calculate Databases

    Solution 4.3 Creating a Working ScenarioIn 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, right-click 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.

    6. Click Close.

    Copying Data into the Working Scenario

    1. Create the following calculation script:

    /* 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

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 4 Developing Advanced CalculationsSolutions

    Essbase Analytics Calculate Databases 35

    DATACOPY "Forecast" TO "Working";ENDFIX

    2. Save the script as Working.csc.

    3. Execute Working.csc.

    4. In AdvancedCalcs.xls, select the Working worksheet.

    5. Refresh the worksheet.

    6. Compare your results to the following figure:

    Solution 4.4 Creating Empty BlocksIn 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.

    3. Select Edit > Properties.

    The Database Properties dialog box is displayed.

    4. Select the Statistics tab.

    N O T E

    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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsSolutions

    36 Essbase Analytics Calculate Databases

    5. Record the number of existing data blocks.

    6. Create the following calculation script:

    /* Information Assumptions:

    1. Accounts and Year Tot are dense2. 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.

    8. Execute EmptyBud.csc.

    9. Select Organize > Database Properties.

    The Database Properties dialog box is displayed.

    10. On the Statistics tab, click Refresh.

    The database statistics are refreshed.

    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 AverageIn this exercise, you create a six-month rolling average for unit sales. What follows is one of many possible solutions for this exercise.

    Modifying the Outline

    1. Open the BigCalc Sales outline.

    2. Expand the Scenario dimension.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 4 Developing Advanced CalculationsSolutions

    Essbase Analytics Calculate Databases 37

    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.

    Creating a Rolling Average Calculation

    1. Create the following calculation script:

    /* Housekeeping */SET UPDATECALC OFF;

    "Rolling 6 Avg Units" = @MOVAVG (

    Units,6,@XRANGE ("Prior Year"->Jan, "Current Year"->Dec)

    );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.

    6. Refresh the worksheet.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 4 Developing Advanced CalculationsSolutions

    38 Essbase Analytics Calculate Databases

    7. Compare your results to the following figure:

    Copying the Formula to the Outline

    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.

    7. In the formula text box, right-click.

    8. Select Paste.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 4 Developing Advanced CalculationsSolutions

    Essbase Analytics Calculate Databases 39

    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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 5 Calculating DynamicallySolutions

    40 Essbase Analytics Calculate Databases

    Lesson 5 Calculating Dynamically

    Solution 5.1 Eliminating Back CalculationIn 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.

    5. Expand the DynCalc application node.

    6. Right-click the DynCalc Sales database node.

    7. Select Rename.

    The Rename Database dialog box is displayed.

    8. In the Rename to text box, type DynSales.

    9. Click OK.

    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

    Discount %

    Labor/Unit

    Matl/Unit

    Overhead Rate

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 5 Calculating DynamicallySolutions

    Essbase Analytics Calculate Databases 41

    3. Change the consolidation property for the members moved in step 2 to ^ (never consolidate).

    4. Add the following shadow rates to the outline:

    5. Modify outline members based on the following table:

    6. Change the following members to Dynamic Calc:

    Avg List Price

    Avg Disc %

    Avg Labor/Unit

    Avg Matl/Unit

    Member Parent Properties Member FormulaAvg List Price Gross Sales ~ Gross Sales / Units;

    Avg Disc % Discounts ~Expense Reporting

    Discounts / Gross Sales

    Avg Labor/Unit Direct Labor ~Expense Reporting

    Direct Labor / Units;

    Avg Matl/Unit Material ~Expense Reporting

    Material / Units;

    Avg OH Rate Overhead ~Expense Reporting

    Overhead / Direct Labor;

    Member Parent Property Member FormulaGross Sales Net Sales + Units * List Price;

    Units Gross Sales ~

    Discounts Net Sales - Gross Sales * Discount %;

    Gross Sales (shared) Discounts ~

    Direct Labor Cost of Sales + Labor/Unit * Units;

    Units (shared) Direct Labor ~

    Material Cost of Sales + Matl/Unit * Units;

    Units (shared) Material ~

    Overhead Cost of Sales + Direct Labor * Overhead Rate

    Direct Labor (shared) Overhead ~

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 5 Calculating DynamicallySolutions

    42 Essbase Analytics Calculate Databases

    Avg OH Rate

    Gross Margin %

    7. Compare your completed outline to the following figures:

    Gross Margin accounts:

    Input accounts

    8. Click Save.

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

    Modifying CalcAll.csc

    1. Open CalcAll.csc.

    2. Save CalcAll.csc as CalcDyn.csc.

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 5 Calculating DynamicallySolutions

    Essbase Analytics Calculate Databases 43

    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 Smart View

    1. Open Dynamic.xls.

    2. Select the ShadowRates worksheet.

    3. Click (connection manager).

    The Connection Manager dialog box is displayed.

    4. Click Add.

    5. Select URL Provider.

    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.

    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.

    13. Click Connect.

    The available applications are displayed under the localhost server node.

    14. Expand the DynCalc application node.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 5 Calculating DynamicallySolutions

    44 Essbase Analytics Calculate Databases

    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.

    25. Select Hyperion > Active Connections > DynSales.

    Testing Dynamic Calculations

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

    2. Refresh the ShadowRates worksheet.

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 5 Calculating DynamicallySolutions

    Essbase Analytics Calculate Databases 45

    4. Compare your calculation results to the following figure:

    Solution 5.2 Optimizing with Dynamic CalculationsIn 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

    Qtr 2

    Qtr 3

    Qtr 4

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 5 Calculating DynamicallySolutions

    46 Essbase Analytics Calculate Databases

    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

    Unit Mix

    Sales $ Mix

    Rolling 6 Avg Units

    4. Make the following scenarios Dynamic Calc and flagged for two-pass calculation:

    Act Vs Bud

    Act Vs Fcst

    Bud Vs Fcst

    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.

    10. In Dynamic.xls, select the Aggressive worksheet.

    11. Set DynSales as the active connection.

    12. Refresh the Aggressive worksheet.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 5 Calculating DynamicallySolutions

    Essbase Analytics Calculate Databases 47

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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    48 Essbase Analytics Calculate Databases

    Lesson 6 Normalizing Data

    Solution 6.1 Loading Data to Upper-Level MembersIn 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.

    5. Save the calculation script as ClearAll.csc.

    Loading and Calculating Multilevel Inputs

    1. Open UpperLevel.xls (located in c:\CF\EssCalcs\Calcs\Normalize).

    2. Select the Multilevel Input worksheet.

    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.

    10. Calculate CalcDyn.csc.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 6 Normalizing DataSolutions

    Essbase Analytics Calculate Databases 49

    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.

    6. Modify the script to perform the following tasks:

    Set aggregate missing values to OFF.

    Calculate only Current Year data.

    Recalculate Gross Margin, after all dimensions are consolidated.

    7. Compare your results to the following script:

    /* Information

    Created by: YourNameCreated On:9/22/2005Purpose: This script consolidates the DynCalc DynSales database in

    Current Year and then recalculates Gross Margin to offsetupper-level data loads.

    *//* Housekeeping */

    SET UPDATECALC OFF;SET AGGMISSG OFF;

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

    /* Main Rollup */

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    50 Essbase Analytics Calculate Databases

    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

    Input data is sent to DynCalc DynSales.

    5. Select the Level 0 AuditSheet worksheet.

    6. Run CalcDyn.csc.

    7. Refresh the worksheet.

    8. Examine the comparison formulas for errors.

    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.

    Calculate only Current Year data.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 6 Normalizing DataSolutions

    Essbase Analytics Calculate Databases 51

    5. Compare your results to the following script:

    /* Information

    Created by: YourNameCreated On: 9/22/2005Purpose: This script consolidates the Bigcorp Sales database in

    Current Year and then recalculates Gross Margin to offsetupper-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);

    /* Close out the Baseline Fix */ENDFIX

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

    Solution 6.2 Developing a Normalization TableIn 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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    52 Essbase Analytics Calculate Databases

    4. Compare your results to the finished normalization table in the following figure:

    Solution 6.3 Copying Rates and DriversIn 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:

    /* Information

    Created by: YourNameCreated On: 9/22/2005Purpose: 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

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 6 Normalizing DataSolutions

    Essbase Analytics Calculate Databases 53

    /* 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.

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

    7. Set DynCalc as the active connection.

    8. Calculate Budget.csc.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    54 Essbase Analytics Calculate Databases

    9. Refresh the worksheet. Compare your results to the following figure:

    Solution 6.4 Allocating Other CostsIn this exercise, you complete the budget calculation by adding a section to allocate other costs.

    1. Open Budget.csc.

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

    /* Information

    Created by: YourName

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 6 Normalizing DataSolutions

    Essbase Analytics Calculate Databases 55

    Created On:9/22/2005Purpose: 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);

    /*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

    /* 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";

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    56 Essbase Analytics Calculate Databases

    "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.

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

    4. Click OK.

    5. Click Save.

    The Restructure Database Options dialog box is displayed.

    6. Select All data.

    7. Click OK.

    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.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 6 Normalizing DataSolutions

    Essbase Analytics Calculate Databases 57

    5. Refresh the worksheet. Compare your results to the following figure:

    Solution 6.5 Optional: Creating a Multilevel AllocationIn 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:

    /* Information

    Created by: YourNameCreated On:9/22/2005

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    58 Essbase Analytics Calculate Databases

    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);

    /*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

    /* 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";

    /* 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 */

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 6 Normalizing DataSolutions

    Essbase Analytics Calculate Databases 59

    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

    /* 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";

    /* 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.

    6. Set DynCalc as the active connection.

    7. Calculate Budget.csc.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    60 Essbase Analytics Calculate Databases

    8. Refresh the worksheet. Compare your results to the following figure:

    Solution 6.6 Creating Multiple-Database CalculationsIn 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.

    2. Select Edit > Location aliases.

    The Location Aliases dialog box is displayed.

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • 6 Normalizing DataSolutions

    Essbase Analytics Calculate Databases 61

    3. In the first row of the table, create a location alias based on the following table:

    4. Click Test.

    A check mark is displayed in the Verified column.

    5. Click Set.

    6. Click Close.

    Calculating Across Databases

    1. Create a calculation script for DynSales based on the following script:

    /* Housekeeping */SET UPDATECALC OFF;

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

    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.

    Parameter ValueAlias Taxes

    Essbase Server localhost

    Application BigTax

    Database Taxer

    User Name trnadmin

    Password hyperion

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

  • Lesson 6 Normalizing DataSolutions

    62 Essbase Analytics Calculate Databases

    9. Compare your results to the following figure:

    Oracle

    Interna

    l & Ora

    cle Aca

    demy

    Use On

    ly

    Table of ContentsExercisesLesson 3: Developing Calculation ScriptsLesson 4: Developing Advanced CalculationsLesson 5: Calculating DynamicallyLesson 6: Normalizing Data

    Exercise SolutionsLesson 3: Developing Calculation ScriptsLesson 4: Developing Advanced CalculationsLesson 5: Calculating DynamicallyLesson 6: Normalizing Data

    ExercisesLesson 3 Developing Calculation ScriptsExercise 3.1 Testing Intelligent CalculationExercise 3.2 Comparing FIX and IFExercise 3.3 Testing Calculation Member Block Syntax

    Lesson 4 Developing Advanced CalculationsExercise 4.1 Creating Complex ConditionalsExercise 4.2 Creating a Baseline ForecastExercise 4.3 Creating a Working ScenarioExercise 4.4 Creating Empty BlocksExercise 4.5 Calculating a Rolling Average

    Lesson 5 Calculating DynamicallyExercise 5.1 Eliminating Back CalculationModifying CalcAll.cscTesting Dynamic Calculations

    Exercise 5.2 Optimizing with Dynamic Calculations

    Lesson 6 Normalizing DataExercise 6.1 Loading Data to Upper-Level MembersExercise 6.2 Developing a Normalization TableExercise 6.3 Copying Rates and DriversExercise 6.4 Allocating Other CostsExercise 6.5 Optional: Creating a Multilevel AllocationExercise 6.6 Creating Multiple-Database Calculations

    Exercise SolutionsLesson 3 Developing Calculation ScriptsSolution 3.1 Testing Intelligent CalculationSolution 3.2 Comparing FIX and IFSolution 3.3 Testing Calculation Member Block SyntaxTesting Units as Anchor MemberTesting List Price as Anchor MemberTesting Sep as Anchor MemberTesting O-IBM as Anchor MemberTesting Forecast as Anchor Member

    Lesson 4 Developing Advanced CalculationsSolution 4.1 Creating Complex ConditionalsSolution 4.2 Creating a Baseline ForecastSolution 4.3 Creating a Working ScenarioCreating Substitution VariablesCopying Data into the Working Scenario

    Solution 4.4 Creating Empty BlocksSolution 4.5 Calculating a Rolling AverageModifying the OutlineCreating a Rolling Average CalculationCopying the Formula to the Outline

    Lesson 5 Calculating DynamicallySolution 5.1 Eliminating Back CalculationCreating a Test ApplicationModifying the DynSales OutlineModifying CalcAll.cscResetting the DatabaseAdding a Connection in Smart ViewTesting Dynamic Calculations

    Solution 5.2 Optimizing with Dynamic CalculationsModifying the DynSales Outline

    Lesson 6 Normalizing DataSolution 6.1 Loading Data to Upper-Level MembersCreating the ClearAll Calculation ScriptLoading and Calculating Multilevel InputsModifying the Calculation ScriptLoading and Calculating Level 0 InputsModifying the Calculation Script

    Solution 6.2 Developing a Normalization TableSolution 6.3 Copying Rates and DriversSolution 6.4 Allocating Other CostsModifying the OutlineTesting the Calculation Script

    Solution 6.5 Optional: Creating a Multilevel AllocationSolution 6.6 Creating Multiple-Database CalculationsCreating a Location AliasCalculating Across Databases