document.pdf

July 7, 2017 | Author: chaos26k | Category: Oracle Corporation, Oracle Database, Databases, Computer Data, Technology
Share Embed Donate


Short Description

Download document.pdf...

Description

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

e

bl a r fe

s

an r t n

e

m rae

no a as 11.1.2 h Oracle Essbase Bootcamp ฺ ) t e e ฺn Guid t s ca ent m d uGuide coStudent t • Volume II S @ t s d i e th m e e ra to us g ( ry nse r e n lice Tre

G

D63979GC21 Edition 2.1 February 2013 D80598

Author

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Pete DeHaan

Disclaimer

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Technical Contributors and Reviewers Sergiy Pecherskyy Lisa Alexander Stan Ziolkowski Art Hetherington Frank Laffey Eleanor Salerno Yulia Stolerman

Editor Susan Moxley

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:

s

an r t n

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.

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

e

G

m rae

e

bl a r fe

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Table of Contents

0

Preface Course Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Course Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Course Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Student Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Activity Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Related Courses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

s

an r t n

no a as ฺ h ) t Lesson 1: Introduction to Essbase e de i n ฺ u t s . .t. G About Multidimensional Analysis . . . . . . . . . . .c. a . . . . . .n . . . . . . . . . . . . . . . . . . . . 1-2 e m d o Avoiding Pitfalls of Spreadsheet-Based c Analysis. tu . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 S @ t Providing Business Perspective. . . . . . . . . . . s d thi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 e Appealing to Analysts e . .m . . . . . .s.e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7 a u r About Essbase. . . . .(.g. . . . . . t.o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 y e r Essbase Architecture er c.e.n. .s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-11 n e Client r Tier. . . .l.i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 T e mMiddle Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 e a Database Tier. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15 r

G

Oracle Exalytics Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Essbase on Exalytics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Essbase Cube Development Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Essbase Business Scenarios and Training Environment . . . . . . . . . . . . . . . . . . . . . Business Scenario: Bigcorp Corporation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Business Scenario: Country Kitchen Desserts . . . . . . . . . . . . . . . . . . . . . . . . . . Training Environment: Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Training Environment: Developer Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

e

bl a r fe

1-16 1-17 1-18 1-19 1-20 1-22 1-24 1-25

Lesson 2: Designing Applications and Databases Essbase Implementation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Analyzing and Planning Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Table of Contents

Identifying Business Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Examining Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Analyzing Sample Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 Selecting a Database Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Designing Outlines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-11 Creating Applications and Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13 Creating Block Storage Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16 Creating Block Storage Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 Block Storage Database: Server File Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20 Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 Rules Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22 Calculation Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24 Dense and Sparse Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25 Data Blocks and the Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26 Design Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28 Creating Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30 Creating Dimensions and Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32 Moving Dimensions and Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34 Modifying Member Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-36

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c sS dt@ thiDimensions Lesson 3: Designing Data Descriptor e em use a r Data Descriptor Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 (g eOverview to y r Designing Time erDimensions ns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 n e e c Tracking r Time lini Multiple Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 T e mTracking Time in a Single Dimension. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 e a Designing Scenario Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 r

G

Tracking Data Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11 Tracking Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 Outline Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 Hierarchy Structures: Consolidation Operators . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 Hierarchy Structures: Shared Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17 Member Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19 Designing Accounts Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20 Consolidation Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22 Design Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24 Creating Accounts Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26 Testing Outline Calculations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27 Intelligent Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29 Setting the Default Database Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30

iv

e

bl a r fe

Essbase 11.1.2 Bootcamp

Table of Contents

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 4: Optimizing Data Descriptor Dimensions Creating Member Aliases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Dimension Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Creating Period-to-Date Totals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6 Creating Period-to-Date Calculated Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7 Implementing Dynamic Time Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9 Dynamic Calc Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Advantages of Dynamic Calc Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Considerations for Dynamic Calc Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Dynamic Calc and Store Option. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Enhancing Accounts Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14 Implementing Time Balance Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Calculating Variances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17 Optimizing Data Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 Optimizing with Label-Only Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20 Automatic Optimization: Implied Shares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 Reducing Report Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c Lesson 5: Developing Dimension Designs dt@ this S e m se. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Business View DimensionseOverview a r gDesignt.o. . u. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4 Attributes in Database ( y UDAs . . . e . .r.r. . . . .n . .s.e. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4 n e Attribute re Dimensions lic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 T e Combining Business Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 m e a

Gr

Combining Business Views: Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 Redesigning Dimensions: Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 Developing Label Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 Designing Primary Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Designing Secondary Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-11

Lesson 6: Creating Basic Dimension Build Rules Files Rules Files Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 Dimension Build Rules Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 Creating Dimension Build Rules Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7 Prepping Data Prep Editor (Steps 1–6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Creating Dimensions (Step 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14

Essbase 11.1.2 Bootcamp

e

bl a r fe

v

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Table of Contents

Selecting the Dimension Build Method (Step 8). . . . . . . . . . . . . . . . . . . . . . . . . . Defining Field Properties (Step 9) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Validating Dimension Build Rules Files (Step 10) . . . . . . . . . . . . . . . . . . . . . . . . Completing Dimension Build Rules Files (Steps 11 and 12) . . . . . . . . . . . . . . . . Configuring Dimension Maintenance Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Moving Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying Member Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sorting Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Updating Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6-17 6-19 6-22 6-24 6-26 6-27 6-29 6-31 6-33

Lesson 7: Creating Advanced Dimension Build Rules Files

bl a r fe

e

s

Advanced Dimension Build Rules Files Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Creating Shared Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Parent-Child Build Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Other Methods for Creating Shared Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7 Manipulating Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9 Arranging Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10 Altering and Ignoring Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13 Creating User-Defined Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15 Uses for UDAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15 Rules for Creating UDAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16 Creating Attribute Dimensions with Rules Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17 Adding Attribute Dimensions with Rules Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-19 Assigning Attributes in Rules Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

e m e ra Lesson 8: Loading Data

G

Data Load Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 Free-Form Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Data Sources That Require Rules Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Data Load Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 Creating Data Load Rules Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Prepping Data Prep Editor (Steps 1–6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10 Defining Field Properties (Step 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12 Defining Data Load Headers (Step 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15 Setting Data Load Values Options (Step 9) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17 Validating Data Load Rules Files (Step 10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19 Completing Data Load Rules Files (Steps 11 and 12) . . . . . . . . . . . . . . . . . . . . . 8-20 Selecting and Rejecting Records. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-22

vi

Essbase 11.1.2 Bootcamp

Table of Contents

Capturing New Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-24

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 9: Getting Started with Smart View Navigating Smart View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 Smart View Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Smart View Excel User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Enabling and Disabling Smart View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6 Connecting to Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Working with Shared Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8 Working with Private Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-11 Managing Private Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14 Creating Ad Hoc Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15 Adding and Removing Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17 Zooming In and Out on Dimension Members . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18 Pivoting Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20 Keeping and Removing Dimension Members . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22 Setting the Point of View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23 Selecting Dimension Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24 Filtering Dimension Member Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-26 Associating Data Sources with Worksheets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-28 Creating Free-Form Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29 Free-Form Label Placement Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29 Adding Member Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-30

s

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

e 10: Creating Reports with Smart View Lesson m e ra

G

Updating Essbase Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Adjusting Data Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Submitting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5 Calculating Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6 Integrating Essbase Data with Microsoft Office . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8 Copying Dynamic Data Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9 Visualizing Dynamic Data Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-11 Creating Shared Database Perspectives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12 Creating Smart Slices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14 Setting Smart Slice Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16 Creating Custom Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18 Interactive Report Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20 Creating Reports with Report Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22

Essbase 11.1.2 Bootcamp

e

bl a r fe

vii

Table of Contents

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11: Data Storage and Calculation Calculation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-2 Outline-Based Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-4 Script-Based Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-5 Calculation Script Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-8 Database Calculation Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-9 Data Block Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-11 Data Blocks and the Index System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-12 Data Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-14 Dense Dimensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-16 Sparse Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-18 Interpreting Database Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-20 Dimension Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-21 Block Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-22 Data Block Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-24 Data Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-25 DATACOPY Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-26 Sparse Dimension Consolidation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-27 Member Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-29 Database Calculation Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-31 Input Data Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-32 Dense Dimension Calculation Process: Accounts . . . . . . . . . . . . . . . . . . . . . . . .11-33 Dense Dimension Calculation Process: Time . . . . . . . . . . . . . . . . . . . . . . . . . . .11-34 Sparse Dimension Calculation Process: Customer . . . . . . . . . . . . . . . . . . . . . . .11-35 Sparse Dimension Calculation Process: Product. . . . . . . . . . . . . . . . . . . . . . . . .11-37

s

an r t n

o

e

G

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

Lesson 12: Creating Calculation Scripts Calculation Script Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2 Information Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-6 Housekeeping Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8 Baseline Fix Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10 Normalization Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-12 Main Rollup Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14 Back Calculation Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-15 Returning Correct Calculation Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16 Expected Behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17 Correcting Calculated Percentages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19 Design Considerations for Rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-22

viii

e

bl a r fe

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Table of Contents

Preventing Consolidation of Rates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Correcting Derived Rates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Correcting Input Rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Troubleshooting CALC DIM Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Calculation Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Single-Pass Calculation with Incorrect Results . . . . . . . . . . . . . . . . . . . . . . . . . Multiple-Pass Calculation with Correct Results . . . . . . . . . . . . . . . . . . . . . . . . .

12-24 12-25 12-26 12-28 12-30 12-32 12-34

Lesson 13: Controlling the Calculation Process Top-Down Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2 Focusing Calculations with FIX Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4 FIX Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5 FIX Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5 Calculating Conditionally with IF Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-7 Boolean Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-9 Syntax Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-11 Considering Performance with IF Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-13 Number of Data Blocks Processed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-14 Number of Calculation Passes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-16

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e e in Calculations em Lesson 14: Referencing Members s a u r (g e to y r Referencing Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2 er ceExplicitly. ns n e Referencing r Members li Dynamically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4 T e Referencing Sets of Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6 aem

Gr

Referencing Related Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-8 Creating Calculation Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-10 Creating Temporary Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-11 Creating Substitution Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-14

Lesson 15: Developing and Testing Complex Calculation Scripts Implementing a Script Development Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2 Following a Calculation Test Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-4 Implementing a Prototype Phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-6 Pilot Phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-9 Upper-Level Data Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-13 Aggregate Missing Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-14 Leaf-Node Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-17

Essbase 11.1.2 Bootcamp

e

bl a r fe

ix

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Table of Contents

Intelligent Calculation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Block Marking: Clean Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Block Marking: Dirty Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Usage Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15-18 15-20 15-23 15-25

Lesson 16: Normalizing Data Allocating Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2 Calculating Fixed Rate Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3 Calculating Dynamic Ratio Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-5 Planning Data Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-6 Partitioning Calculations by Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8 Developing Normalization Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-10 Developing Block Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-13 Normalizing Rates and Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-15 Copying and Clearing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-17 Copying Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-18 Clearing Data with CLEARDATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-20 Clearing Data with CLEARBLOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-22

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c t@ is S dDimensions Lesson 17: Creating Attribute e th m e e ra to. . u. .s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-2 Attribute Dimensions(Overview g ry nBenefits r se . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3 Attribute Dimension e n e Attribute re Calculations lic Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-5 T e Attribute Dimensions to Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7 Adding m e a

Gr

Associating Attribute Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-8 Assigning Attribute Members to Base Dimension Members . . . . . . . . . . . . . . . 17-10 Design Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12 Design Considerations: Database Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-14 Design Considerations: Batch Calculation Performance . . . . . . . . . . . . . . . . . . 17-15 Design Considerations: Report Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-16 Design Considerations: Report Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 17-18

Lesson 18: Analyzing Varying Attributes Varying Attributes Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Varying Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enabling Outlines for Varying Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Associating Independent Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

x

e

bl a r fe

18-2 18-3 18-4 18-5

Essbase 11.1.2 Bootcamp

Table of Contents

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Assigning Varying Attributes to Base Dimension Members . . . . . . . . . . . . . . . . . 18-7 Viewing Varying Attribute Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-9

Lesson 19: Analyzing Text and Dates Typed Measures Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2 Enabling Typed Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-4 Creating Text Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-5 Creating Text Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-7 Populating and Mapping Text Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-8 Associating Text Lists with Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-9 Creating Date Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-10 Viewing Typed Measures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-12 Calculations Based on Typed Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-13 Text Measure Calculations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-13 Date Measure Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-14

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

xi

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Table of Contents

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

xii

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Preface

0

Welcome to Oracle Essbase 11.1.2 Bootcamp. Before you begin, please take a moment to review this section. The preface presents an overview of the following information: • Course objectives • Structure of the course

e

bl a r fe

s

an r t n

no a as ฺ h ) t • Conventions used in the book e de i n ฺ u t G asyour learning • Additional resources to enhance t c n demight want to attend in the future u comthat t • Relevant follow-up @ courses you dt this S e em use a r Course (g Objectives to y e r After er completing ns this course, you should be able to: n e e c r li • Course materials used in the class

e

Gra

T e m

• Create block storage databases

• Build rules files for dimension build and data load • Analyze data using Smart View • Create basic and advanced calculation scripts

Course Structure Oracle Essbase 11.1.2 Bootcamp is a 5-day, instructor-led training course consisting of lectures, demonstrations, and hands-on exercises. In this course, the instructor presents a topic, and guides you through the exercises. Demonstrations and hands-on exercises reinforce the concepts and skills introduced during lectures.

Preface

Course Materials

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

You use two books in class—the student guide and the activity guide. The instructor may also give you handouts.

Student Guide The student guide contains lessons. Each lesson begins with a list of objectives followed by the presentation of slides and accompanying text. The lesson ends with a summary of the topics covered in the lesson.

Activity Guide

e

bl a r fe

The activity guide has two sections—exercises and exercise solutions.

s

an r t n

• Exercises—A critical part of the learning process is the challenge of completing real tasks associated with each lesson. Each exercise is an opportunity to apply your knowledge.

no a as ฺ steps to h • Exercise Solutions—The exercise solutions present the detailed ) t e de i successfully complete the exercises. n ฺ u t t G self-study. cas foreguided n Additionally, the activity guide has two casem studies co Stud @ dt this e Conventions em use a r o used in this course book: (g e tare The following text y conventions r r eentered, ns to be selected, names of files and modules, and menu n e • Text to be options e c li Tr are displayed selections in bold type. Examples: e m e a

Gr

- Select Clear Profile.

- Click YES to clear the profile. • When available, figures are used to identify an object or task. Example: Click

.

• Keyboard shortcuts are displayed as follows: Ctrl+Enter • Alerts are used to direct your attention to different types of information.

NOTE: A note provides related information, common mistakes, or cautions about the current topic.

xiv

Essbase 11.1.2 Bootcamp

Preface

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

TIP: A tip provides information that helps you work more efficiently.

Additional Resources Use the following resources to enhance your learning: • Oracle Essbase 11.1.2.1 Database Administrator’s Guide • Oracle Hyperion Smart View for Office, Fusion Edition 11.1.2.1 User’s Guide

e

bl a r fe

• Oracle Technology Network (http://www.oracle.com/technology/)

s

Oracle provides the following user assistance with Enterprise Performance Management products:

an r t n

Gr

no a as ฺ help, general h • Help menu—From the Help menu in the software, access screen-level ) t e de (OTN), and i n product help, Oracle Support Web site, Oracle Technology Network ฺ u t as nt G oracle.com. c de om tfiles. u c • MetaLink—Access release-specific Readme dt@ this S e • E-Delivery—Access release-specific em use installation documentation before downloading a r software. (g e to y r s er cenNetwork—Explore • Oracle Technology product documentation, get started with n e i r l Java, T PHP, Linux, and other industry-standard technologies, download free software, e aemand read technical articles and notes authored by OTN members. You can also join • Context-sensitive help—Click Help for context-sensitive help.

discussion forums to request advice from Oracle engineers and other OTN members; listen to podcast interviews with Oracle engineers, customers, and partners; bookmark Technology and Developer Centers devoted to your area of interest; and subscribe to Developer e-mail newsletters.

• OTN Documentation Library—Download documentation for all Enterprise Performance Management products, including reference information and PDF and HTML versions of each deliverable.

Related Courses The following courses are available: • Oracle Essbase 11.1.2: Calculate Databases • Oracle Essbase Studio 11.1.2: Create and Manage Data Structures

Essbase 11.1.2 Bootcamp

xv

Preface • Oracle Essbase 11.1.2: Deploy Aggregate Storage Databases • Oracle Essbase 11.1.2 for System Administrators

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• Oracle Hyperion Smart View, Fusion Edition 11.1.2 for Essbase

NOTE: Course names and learner paths may change. Visit www.oracle.com/education for the latest information.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

xvi

Essbase 11.1.2 Bootcamp

L E S S O N

1 1

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Storage and Calculation

11

Objectives

e

bl a r fe

At the end of this lesson, you should be able to: • Describe block storage calculations • Explain the default database calculation order

e

G

m rae

s

an r t n

o n a • Identify data blocks as ฺ h ) • Explain how data blocks are indexed et de i n ฺ u t s G t • Interpret database statistics ca n e com tud • Identify when datat@ blocks areS created d this e mblocksstorage • Describe e the e database calculation process a u r (g e to y r er cens n e li Tr

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Calculation Overview •

Database values: – Input data – Calculated data



Calculation options: – Outline calculations – Calculation script calculations

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t G asCalculated t c n e Input data Calculation om Report ddatabase u c t dt@ this S e em use a r (g e to y r er cens n e li Tr Calculation Overview e m raeA database contains two types of values: the values that you enter (input data) and the Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

values that are calculated from the input data (calculated data). Consider the following examples: • You are a database administrator and developer for a small company and are responsible for data loading and reporting. You collect monthly sales figures for all products and calculate the total sales revenue for each product family.

• You are a budget analyst in a large company. You enter the budget and actual values for the cost of sales for several products in several regions. You calculate the variance between budget and actual values for each product in each region. • You are a sales manager and Essbase power user. Your section of the sales database contains retail sales figures and prices for all products. You calculate what happens to total margin if you increase the price of one product for retail customers by 5%.

11-2

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

From these examples, you see good reasons for calculating data. Many analyses require aggregation of detail data into summary members to spot trends that might not be noticed if only detail data was examined. For example, after data is loaded into the low-level month members Jan, Feb, and Mar, calculation of the Year Tot dimension produces a high-level value for Qtr 1. Similarly, after low-level values are loaded into R-Gateway, R-Apple, and R-Dell, calculation of the Customer dimension produces a high-level value for Retail, and so on. Another reason for calculating databases is to perform complex business operations, such as cost allocations, sales or product mix analyses, and what-if investigations. Essbase block storage databases tackle these kinds of analyses and provide more than 250 functions to help you produce solutions faster.

e

bl a r The process of creating stored calculated values in a block storage database is called fe s n batch calculation, because the process typically occurs as part of one large batch of -tra operations (loading, calculating, and reporting). Generally, you execute o an batch n block storage calculation immediately after you load input data. You can batch calculate a as ฺ scripts. databases two ways: through outline calculations or through h calculation ) t e de i n ฺ u t G as thatnexecute t c NOTE: Calculation scripts can contain commands outline calculations, m ude o c t but outline calculations cannot Sor execute calculation scripts. @ contain t s d i e th m e e ra to us g ( ry nse r e ren lice T e m e ra

G

Essbase 11.1.2 Bootcamp

11-3

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Outline-Based Calculations • •

Are used for less complex calculations Follow outline relationships or formulas

e

Calculated database

bl a r fe

s

an r t n

G

no a as ฺ h ) t CALC eALL e d i n ฺ u ast nt G Default c om tude calculation script c Outline dt@ this S e em use a r (g e to y r er cens n e i lCalculations Tr Outline-Based e m raeOutline calculations represent the simplest method of calculation. When Essbase Input data

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

calculates an entire dimension, it does so according to the relationships between members in the dimension hierarchies and according to member consolidation operators or formulas. You initiate outline calculations by executing the default database calculation. As shown in the diagram on the slide, the default calculation contains the calculation script command CALC ALL, which, based on the consolidation operators and formulas in the database outline, calculates and aggregates each dimension in the database.

11-4

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Script-Based Calculations • • •

Calculate all or a portion of the database Control the order in which dimensions are calculated Perform complex calculations

e

Calculated database

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c Custom om tude c calculation sS dt@ thiscript e em use a r (g e to y r er cens n e li Tr Script-Based Calculations e m raeA calculation script contains a series of calculation commands, equations, and formulas. Input data

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

You use calculation scripts to specify exactly how you want Essbase to calculate a block storage database. For example, you can calculate part of a database or copy data values between members, control the order in which dimensions are calculated, and perform complex procedural calculations, such as allocations, that are not possible in outline calculations.

When to Execute Calculation Scripts Calculation requirements are driven by processes that typically include multiple interim steps. Thus, typically, multiple calculation scripts are developed, each script satisfying the calculation needs of a process step. The following example demonstrates how specific calculation scripts fit into the data flow processes for Bigcorp:

Essbase 11.1.2 Bootcamp

11-5

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• The budgeting group finalizes the budget for the coming year. The budget administrator loads budget data into Bigcorp Sales and executes a script to consolidate budget data across all products and customers. • On a monthly basis, actual data for the current year is loaded from extracts generated from the IT data warehouse. After data is loaded, the database administrator executes a script to consolidate actual data for the current month. • The Bigcorp finance group makes adjusting entries through Smart View. After all adjustments are entered, the database administrator recalculates the actual data for the entire year, creating quarterly and yearly totals. • Bigcorp corporate expenses, such as advertising and IT salaries, are loaded to the total for all products and all customers and then, based on drivers such as percent of total units sold and percent of total revenues, are allocated to individual productcustomer combinations.

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c Scalculates year-over-year actual • When all input data is in place, at@ final script s d i e h t and forecast, percentages, and analytic variances, actual variances m fromsbudget e e a metrics. gr to u ( y rr nse e n Dimension-Level ice re lCalculation T Withecustom calculation scripts, you can override the default database calculation on a m e ra temporary or permanent basis. With custom calculation scripts, you can refer to

G

• Bigcorp analysts submit forecasts through the end of the year. Each forecast is based on data for the current month. The senior analyst executes a calculation script that first copies actual data into a rolling forecast from January through the current month, then copies the current forecast into the rest of the months, and then consolidates the rolling forecast.

calculation rules defined in the database outline (either by initiating a dimension-level calculation or by calling a specific member formula), or you can specify new formulas and calculation orders. Essbase provides several commands to initiate dimension-level calculations: CALC ALL, CALC DIM, and AGG. • CALC ALL: Calculates the outline-defined calculations for every dimension in the database. Although this command is the default database calculation, you can also use it in a custom calculation script to control procedural calculation steps. In the following example, the CALC ALL command is executed after data is copied from the Prior Year scenario to the Budget scenario and increased by 10%: DATACOPY "Prior Year" to Budget; Budget = Budget * 1.1; CALC ALL;

11-6

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• CALC DIM: Calculates the outline-defined calculations for the specified dimensions. This command is commonly used in custom calculation scripts to control the order in which dimensions are calculated. In the following example, the data in the Units account is aggregated for all products and all customers: FIX(Units) CALC DIM(Customer, Product); ENDFIX • AGG: Calculates the outline hierarchy calculations for the specified dimensions. An AGG command ignores all member formulas; it consolidates only parent-child relationships. Because it provides faster performance than CALC DIM, it is commonly used to calculate sparse dimensions that are consolidated with addition ( + ) operators.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

11-7

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Calculation Script Editor

Dimensions and members

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Editor Tr Script Calculation e m raeCalculation scripts are essentially text files that Essbase identifies as calculation scripts Functions and commands

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

because the files have .csc file extensions. You can create calculation script text files with any text editor. However, Administration Services Console provides a powerful calculation script editor to assist you.

The script editor includes a list of dimensions and members and a second list of calculation functions and commands, which are organized categorically and alphabetically. To build a script, you can enter calculation commands directly into the text area of the script editor or you can use the point-and-click features of the script editor.

11-8

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Database Calculation Order CALC ALL calculates the outline in the following order:

1. Dim ension tagged Accounts 2. Dim ension tagged Time 3. Dense dimensions (outline order) Optimal order: Largest to smallest

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t 5. Two-pass calculations as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculation Database Order e m raeFor data sets that are at least partially dense, block storage databases maximize Optimal order: Smallest to largest

4. Sparse dimensions (outline order)

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

performance by dividing the standard dimensions of a database into two types: dense dimensions and sparse dimensions. This division enables the database to cope with data that is not smoothly distributed, speeds data retrieval, and minimizes memory and disk requirements.

When you execute a default (CALC ALL) database calculation, dense and sparse dimension designations, in addition to specific dimension properties, determine the order in which dimensions are calculated. For example, if an outline contains a dimension tagged as Accounts and a dimension tagged as Time—as Bigcorp Sales does—the CALC ALL command calculates the database in the following order: 1. Dimension tagged as Accounts 2. Dimension tagged as Time 3. Other dense dimensions (in outline order)

Essbase 11.1.2 Bootcamp

11-9

Lesson 11 Data Storage and Calculation 4. Other sparse dimensions (in outline order)

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

5. Members tagged for two-pass calculation If no dimension is tagged as Accounts, or if the accounts dimension does not contain a calculable formula, the default calculation order is: 1. Dense dimensions (in outline order) 2. Sparse dimensions (in outline order)

TIP: As shown in the example on the slide, you can optimize the calculation performance of your database by arranging dense dimensions in the outline from largest to smallest and sparse dimensions from smallest to largest.

s

an r t n

o

As an Essbase developer, you are responsible for designing a block storage database outline that calculates efficiently and accurately. As you can see from the default calculation order, a block storage database outline is more than a navigational aid for end users; information embedded in the outline reflects the data structure and efficiency of the database. An understanding of how Essbase block storage databases store and process data is the most important factor in efficient calculation design.

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

11-10

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Block Fundamentals Data request process:

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e r li TBlock Data Fundamentals e m raeIn block storage databases, Essbase uses two types of internal structures to store and Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

access data: data blocks and the index system. A data block, which contains a certain number of data cells, is the basic unit of storage in block storage databases. Each unique data value can be considered to exist in a cell of a data block. When a user or a process (such as a calculation) requests a data value, the following process is initiated: 1. A user or process requests data. 2. Essbase searches the index for the requested data blocks. 3. Based on the index entries, Essbase finds the requested data blocks in the database. 4. Essbase brings the requested data blocks into memory. 5. The user or process views or uses data from cells in the requested data blocks.

Essbase 11.1.2 Bootcamp

11-11

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Blocks and the Index System Dimension storage settings

Physical data stored in data blocks Year Accounts Tot

e

s

an r t n

Sce nario->Product->Customer

bl a r fe

G

no a as ฺ h Block Scenario Product Customer ) t e de i n 1 Current Year Lightbolt 365 A O-IBM ฺ u t asO-Acernt G 2 Current Year Lightbolt 365 c A om tu…de c … … dt@ this S e em use a r (g e to y r er cens n e r li the Index System TBlocks Data and e m raeThe configuration of data blocks and the index system in a database correlates to the Index of data blocks

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

configuration of dimensions as dense or sparse. In the example on the slide, the dimensions Year Tot and Accounts are set as dense, which correlates to the configuration of data blocks for this database. By contrast, the dimensions Scenario, Product, and Customer are set as sparse, which correlates to the indexing of data blocks.

In most data sets, data tends to follow predictable patterns of density and sparsity. If you predict the patterns correctly when you select your dense and sparse dimensions, you can store data in a reasonable number of fairly dense data blocks, rather than in an excessive number of highly sparse data blocks. This division enables the database to cope with data that is not smoothly distributed, speeds data retrieval, and minimizes memory and disk requirements.

11-12

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11 Data Storage and Calculation For example, In the Bigcorp Sales database, Bigcorp does not sell every product to every customer; therefore, the data set is reasonably sparse because data values do not exist for many combinations of members of the Product and Customer dimensions. For example, if O-IBM does not buy Lightbolt 365 A hard drives, data values do not exist for the combination O-IBM->"Lightbolt 365 A."

NOTE: In block storage databases, member combinations are denoted by the crossdimensional operator. The symbol for the cross-dimensional operator is ->.

However, consider combinations of members in the Year Tot and Accounts dimensions: For some member combinations on these dimensions, data values almost always exist. For example, data values exist for the member combination Units->January, because at least some products are sold in January. Based on this test, the data set for the Year Tot and Accounts dimensions is reasonably dense.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

11-13

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Cells • •

Are uniquely addressable Require 8 bytes of disk storage

166

182

143

131

149

120

123

150

115

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t In F ebruary of the current year, e de i n 100 units of Lightbolt 365 A hard ฺ u t as nt G drives sold to O-IBM. c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Data Cells e m raeIn block storage databases, each data value is stored in a single, uniquely addressable 100

196

231

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

cell in the database. You refer to a data value by specifying its coordinates along each standard dimension. In the example on the slide, the data value 100 is referenced by the members Feb->Units->"Current Year"->IBM->"Lightbolt 365 A." Each data cell has a unique address, which comprises one member from each dimension in the database, and requires 8 bytes of disk storage. Consider the example of a small database (the following table lists dimensions, dimension size, and configuration): Dimension

Stored Members

Storage Type

Accounts

100

Dense

Time

17

Dense

Scenario

2

Sparse

11-14

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11 Data Storage and Calculation

Dimension

Stored Members

Storage Type

Product

1000

Sparse

Customer

1000

Sparse

In this very small database, the number of potential data cells is 3.4 billion; to calculate the number of potential cells, multiply the number of stored members of one dimension by the number of stored members of all other dimensions (100 Accounts members x 17 Time members x 2 Scenario members x 1000 Product members x 1000 Customer members). In larger databases, it is not uncommon to have trillions of potential data cells.

e

bl a r NOTE: Stored members are members with Store Data, Dynamic Calc and Store, or fe s n Never Share data storage properties. tra n no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr e aem

Gr

Essbase 11.1.2 Bootcamp

11-15

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Dense Dimensions J Price Units Sales

Dense dimensions

100 Feb->Units->

F M 100

Data block (intersections of dense dimensions)

e

bl a r fe

s

an r t n

G

no a s file aPage h ฺ ) t (Essn.pag) e e d i n u tฺ Cell s G a t c address n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e r li TDimensions Dense e m raeA standard report can contain tens of thousands of data values, and it would be Current Year->O-IBM->Lightbolt 365 A

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

extremely inefficient for Essbase to deliver each data value into memory, one eight-byte cell at a time. Instead, for block storage databases, Essbase groups data cells into data blocks of dense dimensions and thus increases the amount of information that can be delivered into memory at one time.

Each data block is a multidimensional array that contains a fixed, ordered location for each possible combination of dense dimension members. Accessing a cell in the block does not involve sequential or index searches. The search is almost instantaneous, resulting in optimal retrieval and calculation speed. Every data block in a block storage database has the same number of cells, and, after Essbase creates a data block, all cells of the data block exist, even if they do not contain data. For calculation, restructuring, data loading, or reporting, data blocks move from disk to memory and back to disk in their entirety, so smaller data blocks generally provide better performance.

11-16

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11 Data Storage and Calculation To calculate the number of cells in a data block, multiply the number of stored members of one dense dimension by the number of stored members of each other dense dimension. The small database in the preceding example stores data in blocks of 1700 cells (17 Time members x 100 Accounts members); each block requires 13600 bytes (1700 cells x 8 bytes) of disk storage. You can control block size by configuring fewer or more dimensions as dense or by reducing the number of stored members in dense dimensions.

NOTE: The optimum block size range for native block storage databases is 8 to 100 KB. However, performance dictates the block size for a database, and performance depends not only on data block size but also on the types of calculations required and the available hardware.

e

bl a r fe

ns a r t For block storage databases, Essbase stores data blocks in page files (Essn.pag), which onn can grow to 2 GB. If Essbase requires more than 2 GB of storage, a it creates additional s a sequential page files. ) h deฺ t e i -> Units -> ”Current ฺn G In the example on the slide, the data value 100 (referenced byuFeb t s t in the cell created by the ca a data Year” -> O-IBM -> “Lightbolt 365 A”) is written into block n e m d to the page file. coblock intersection of Feb and Units, and the data isuwritten t S @ dt this e em use a r (g e to y r er cens n e li Tr e m rae

G

Essbase 11.1.2 Bootcamp

11-17

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Sparse Dimensions Sparse dimensions

100 Feb->Units-> Current Year->O-IBM->Lightbolt 365 A

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c Index file om tude c Essn.pag (Essn.ind) dt@ this S e em use a r (g e to y r er cens n e li TrDimensions Sparse e m raeFor block storage databases, Essbase creates an index entry for each data block for Index entry (intersections of sparse dimensions)

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

which at least one data value exists. Each index entry consists of a unique combination of sparse standard dimension members. Essbase stores index entries in an index file (Essn.ind), which is located in the same directory as the page files. Like page files, index files have a maximum file size of 2 GB. When the current index file reaches the maximum size, Essbase creates another index file, numbered sequentially, to store additional index entries. There is no 1-to-1 relationship between the number of page and index files, and it is not unusual for a single index file to index multiple page files. For example, a fully calculated database can have one index file and 10 page files.

11-18

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11 Data Storage and Calculation In the example on the slide, loading the data value 100 to the member intersection Feb->Units->“Current Year"->O-IBM->"Lightbolt 365 A" creates a data block that is indexed as "Current Year"->O-IBM->"Lightbolt 365 A." Any additional data for that unique combination of sparse dimension members is added to the data block. For example, loading a value of 200 to Mar->Units->"Current Year"->O-IBM->"Lightbolt 365 A" adds data to a second cell in the "Current Year"->O-IBM->"Lightbolt 365 A" data block. You can calculate the number of potential data blocks for a database by multiplying the number of stored members of one sparse dimension by the number of stored members of each other sparse dimension. The sparse dimensions in the previous example (2 scenarios, 1000 products, and 1000 customers) can potentially create 2 million data blocks. However, Essbase creates only the blocks that it requires to store data values. Database Efficiency The efficiency of the data block and index system is based on two principles:

s

an r t n

no a as ฺ h ) et data, deno data block is i n • For combinations of sparse members that do nottฺcontain u G do not use do not require as that t created. Therefore, sparse member combinations you c n om tude disk space or calculation time. c dt@ is S stores data in a reasonable number The best dense-sparse configuration for tahdatabase e eblocks, rather than in a high number of small, em data of mid-sized, densely populated s a u r (g blocks toor a small number of large, sparsely populated data densely populatedydata e r er cens blocks. n e li Tr e m Block Classification aeData

Gr

• Data blocks are created only for combinations of sparse members that contain data (data is stored and calculated only for actual combinations).

In the block storage index, Essbase classifies data blocks according to two criteria: block level and data type. The following table provides descriptions of these classifications: Block Level

• Level 0 block: A block in which every sparse member in the index entry of the block is a level 0 member (The block in the example on the slide, “Current Year” -> O-IBM ->”Lightbolt 365 A,” is a level 0 block.) • Upper-level block: A block in which at least one sparse member in the index entry of the block is not a level 0 member

Data Type

• Input block: A block in which data values were loaded during a data load process (The block in the example on the slide is an input block.) • Noninput block: A block entirely populated with data that was created during a calculation process

Essbase 11.1.2 Bootcamp

e

bl a r fe

11-19

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Interpreting Database Statistics

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Interpreting Database Statistics e m raeThe Database Properties dialog box provides substantial statistical information about a Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

database and its data blocks. You can use this information to benchmark your configuration choices. The most important sets of information for this process are dimension properties and block statistics. To open the Database Properties dialog box:

1. In the navigation hierarchy of Administration Services Console, select the database node. 2. From the Actions menu, select Edit, and then Properties for “DBname.” The Database Properties dialog box is displayed.

11-20

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Dimension Properties • • •

Dense-sparse configuration Members in dimension Stored members in dimension

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Properties Dimension e m raeThe Dimensions tab of the Database Properties dialog box is an informational frame that Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

identifies the dense-sparse configuration, the total number of members, and the number of members stored for each dimension. The Members Stored number is the number that Essbase uses to calculate the size and potential number of data blocks in the database. Although attribute dimensions are displayed on the Dimension Properties tab, Essbase does not consider them when calculating block size or number of potential blocks. Attribute dimensions are entirely dynamic, and, therefore, the Members Stored number for each attribute dimension is zero.

Essbase 11.1.2 Bootcamp

11-21

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Block Statistics Benchmark dense-sparse configuration and storage efficiency

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e r li TStatistics Block e m raeThe Statistics tab of the Database Properties dialog box provides an important set of Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

block statistics that help you test the efficiency of your configuration settings. The following table describes each block statistic and explains how to use each statistic for benchmarking: Statistic

Description

Number of existing blocks

Total number of data blocks in the database at its current state of calculation. Generally, the lower the number of existing blocks when you calculate, the lower the calculation time, because fewer blocks cycle through memory.

Block size (B)

Product of the number of stored members of one dense dimension multiplied by the number of stored members of each other dense dimension multiplied by 8 bytes. Sizes that are too small or too large may adversely affect calculation, storage, and retrieval efficiency.

11-22

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11 Data Storage and Calculation

Statistic

Description

Potential number of blocks

Product of the number of stored members of one sparse dimension multiplied by the number of stored members of each other sparse dimension. In most databases, the product is much larger than the number of existing blocks.

Existing level 0 blocks

Number of current data blocks where all sparse members in the index entry are level 0 members.

Existing upper-level blocks

Number of current data blocks where at least one sparse member in the index entry is an upper-level member. In most databases, the ratio of upper-level to level 0 blocks is very high.

Block density (%)

From a sampling of existing data blocks, the number of cells that have values as a percentage of the total number of cells in the block. Because dense-sparse settings should maximize block density, this percentage is key to evaluating storage and calculation efficiency. In general, a block density below 10% could be a benchmark of poor performance, but keep in mind that when the time dimension is dense, block density increases over time.

s

an r t n

no a aofspotential Percentage of Number of existing blocks divided by number blocks. h ฺ ) t maximum blocks Another key statistic for storage and calculation efficiency, this e e d i n ฺ existing percentage measures the sparsity of the database. It is not uncommon u t thanG1%), as it is the nature s a for this statistic to be very small (less of t cto haveemany n m multidimensional databases combinations without data. co Stud @ t Compression ratio Compressiondefficiency s blocks are stored on disk. Because iwhen e h t #MISSING cells are typically compressed, this statistic inversely mto block e e s a correlates density; as block density increases, the compression u r decreases. g o ( t ratio ry nse r e Average clustering level of the data (page) files. The maximum value, 1, e en licFragmentation ratio Tr indicates no fragmentation. For information on preventing or removing e fragmentation, see the Oracle Essbase Database Administrator’s Guide. m e a

Gr

Essbase 11.1.2 Bootcamp

e

bl a r fe

11-23

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Block Creation • • • •

Data load DATACOPY command Sparse dimension consolidation Some member formulas

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e r li TBlock Data Creation e m raeTo understand the built-in efficiency of block storage database calculations and to create Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

efficient calculations, you must understand how and why Essbase adds data blocks to the page file. Essbase creates data blocks during any one of the following four processes: • Data load • DATACOPY command in a calculation script • Sparse dimension consolidation • Calculation of some member formulas

11-24

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Load

Submit data

e

1

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c Essn.pag Essn.ind om tude c S @ dt this e em use a r (g e to y r er cens n e li Tr Data Load e m raeEssbase creates data blocks when you load data to sparse member combinations for Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

which a data block does not exist. Blocks are created upon input, as part of the dataloading process, whether you load using a data source and a rules file or you load directly from a spreadsheet interface.

The example on the slide shows a worksheet with data for Feb->Units->“Current Year”->O-IBM->“Lightbolt 365 A.” If no data blocks exist for Bigcorp Sales, when you submit the sample spreadsheet Essbase creates the "Current Year"->O-IBM->"Lightbolt 365 A" data block to store the value for Feb->Units. Because no blocks existed before this operation, Essbase creates a page file to store the new block and an index file to store the index entry for the block.

NOTE: If no data blocks exist in a database, no page or index files exist in the database. Essbase creates these files as necessary.

Essbase 11.1.2 Bootcamp

11-25

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

DATACOPY Command DATACOPY "Current Year" TO "Budget";

1

e

bl a r fe

s

an r t n

2

G

no a as ฺ h ) t e de i n ฺ u t as nt G c Essn.pag Essn.ind om tude c S @ dt this e em use a r (g e to y r er cens n e li Tr Command DATACOPY e m raeThe DATACOPY command copies data values from one subset of the database to Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

another subset of the database. This command is useful when you must maintain an original set of data values and perform changes on the copied data set. If necessary, Essbase creates data blocks when you execute a calculation script that contains the DATACOPY command. In the example on the slide, you execute a calculation for Bigcorp Sales that copies all Current Year data into the Budget scenario, based on the following script: DATACOPY "Current Year" TO "Budget"; Essbase copies the “Current Year” -> “O-IBM” -> “Lightbolt 365 A” data block and creates the Budget -> “O-IBM” -> "Lightbolt 365 A" data block. This process adds a data block to the page file and an index entry to the index file.

11-26

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Sparse Dimension Consolidation CALC DIM (Customer);

4

Channel Total

6

1. CY->O-IBM->LB365A 2. BD->O-IBM->LB365A

3

OEM

5

e

bl a r fe

3. CY->OEM->LB365A

s

an r t n

4. CY->CT->LB365A

G

no a has eฺ 6.t)BD->CT->LB365A e uid n ฺ t as nt G c Essn.pag Essn.ind om tude c S @ dt this e em use a r (g e to y r er cens n e li Consolidation TrDimension Sparse e m raeEssbase creates data blocks when sparse dimensions are consolidated. For example, in 1

O-IBM

2

5. BD->OEM->LB365A

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

the Bigcorp Sales outline, the customer O-IBM has two ancestors. Thus, the data values for O-IBM are part of two higher-level totals (OEM and Channel Total) that Essbase needs to calculate after you load data to O-IBM. The example on the slide shows a consolidation of the Customer dimension for Bigcorp Sales, given the following level 0 blocks: • “Current Year”->“O-IBM”-> “Lightbolt 365 A” • “Budget” ->“O-IBM”->“Lightbolt 365 A”

When you execute a CALC DIM command for the Customer dimension, Essbase creates four upper-level blocks—two ancestor blocks for each level 0 IBM data block: • “Current Year” ->“OEM”->“Lightbolt 365 A” • “Current Year”->“Channel Total”->“Lightbolt 365 A”

Essbase 11.1.2 Bootcamp

11-27

Lesson 11 Data Storage and Calculation • “Budget”->“OEM”->“Lightbolt 365 A”

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• “Budget”->“Channel Total”->“Lightbolt 365 A” Notice that, because you are consolidating only the Customer dimension, only Customer names change in the index entries for the new blocks. To see higher-level product totals for each customer, you must also consolidate the Product dimension.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

11-28

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Member Formulas Data blocks are created from member formulas: • If you assign a constant value to a sparse member • If you assign a nonconstant value to a sparse member AND you turn the “Create blocks on equations” setting ON

e

bl a r fe

s

an r t n

o

n a as ฺ h ) t e de i n SET CREATEBLOCKONEQ ON; ฺ u t as nt G "O-Acer" = "O-IBM" * 1.10; mc o tude c dt@ this S e em use a r (g e to y r er cens n e r li Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

Member e T Formulas

m certain circumstances, Essbase can create blocks when member formulas are eUnder a r G executed. Assign a Constant Value to a Sparse Member If you assign a constant value to a sparse member, Essbase creates data blocks. This option is typically seen only in models with sparse measures dimensions where such an assignment makes sense. Assign a Nonconstant Value to a Sparse Member If you assign a nonconstant value to a sparse member AND you turn the “Create blocks on equations” setting ON, Essbase creates data blocks. By default, when a calculation formula assigns a nonconstant value to a member of a sparse dimension for which a block does not exist, Essbase does not create a data block. However, you can override this default behavior in several ways:

Essbase 11.1.2 Bootcamp

11-29

Lesson 11 Data Storage and Calculation • Include the command SET CREATEBLOCKONEQ in your calculation script, as in the following example:

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SET CREATEBLOCKONEQ ON; "O-Acer" = "O-IBM" * 1.1; • Update your database properties to create blocks on equations (the default setting is OFF). Although you can change your default database property setting to ON, this change is not recommended. Sometimes, you do not want new data blocks; for example, you do not want data blocks that contain no values. In large databases, creation and processing of unneeded blocks can increase processing time and storage requirements.

e

bl a r fe

s

NOTE: The SET CREATEBLOCKONEQ calculation command is available only in Release 7.0 and later.

an r t n

no a asworkฺ with nonconstants h For more information on controlling creation of blocks when you ) t Administrator’s e de i and sparse dimensions, see the Oracle Essbase Database Guide and n ฺ u t s G the Oracle Essbase Technical Reference. ca ent m co Stud @ dt this e em use a r (g e to y r er cens n e li Tr e m rae

G

11-30

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Database Calculation Process 2

1

3

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculation Database Process e m raeWhen you perform a complete database calculation, the level 0 input data of the Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

database is calculated across every dimension in dense-sparse order. Although Essbase accepts data input at upper levels, most database designers choose to limit input to level 0 in order to simplify calculation processes. For a comprehensive discussion of calculation of upper-level input data, see “Upper-Level Data Loads” in Lesson 15, “Developing and Testing Complex Calculation Scripts.” For the best calculation performance, your database calculation should follow the process shown in the example on the slide: 1. Load data to level 0 blocks (Although not part of the calculation process, this step is necessary before data is calculated.) 2. Fully calculate level 0 blocks 3. Create upper-level blocks that are based on fully calculated level 0 blocks

Essbase 11.1.2 Bootcamp

11-31

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Input Data Load 1. You load input data. 2. Essbase creates data blocks in memory. 3. Essbase writes data blocks to the page file and indexes them in the index file.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t de i Data set for tฺne u G A" "Curr ent Year"->"O-IBM"->"Lightbolt as nt 365 c om tude c dt@ this S e em use a r (g e to y r er cens n e r Loadli TData Input e m raeWhen you load data, Essbase searches first in the index file for the relevant block entry. Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

If none exists, Essbase creates a data block in memory, writes the input data to the block, and then writes the block into the page file, while creating an index entry in the index file.

For example, in Bigcorp Sales, an input data set for the block "Current Year"-> "O-IBM”->"Lightbolt 365 A" might include values for the accounts Units, Discount %, Labor/Unit, Matl/Unit, Overhead Rate, and so on, for one or more month-level time periods (Jan, Feb, Mar, and so on). When you send the data to the server, Essbase creates a block indexed as "Current Year"->"O-IBM”->"Lightbolt 365 A." After input data is loaded to a block, many data cells in the block remain empty. For example, units and rates for each month exist as input data, but sales, costs, and quarterly totals must be calculated.

11-32

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Dense Dimension Calculation Process: Accounts CALC DIM ("Accounts");

1 1

e

bl a r fe

G

ns a r t Ess0001.pag (page onfile) n a Calculation of s a Accounts dimension ) h deฺ t in existing input blocks e i ฺn 1. GCY->O-IBM->LB365A u t s ca ent m co Stud Ess0001.ind (index file) @ dt this e em use a r (g e to y r er cens n e r li Calculation Process: Accounts TDimension Dense e m raeThe next part of the process is to fully calculate level 0 blocks. The objective is to fill as Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

many empty cells as possible. To accomplish this objective, you calculate the dense dimensions, which make up the interior structure of each data block.

In Bigcorp Sales, Accounts and Year Tot are dense dimensions. Based on the optimal outline calculation order, you use the following CALC DIM command to calculate Accounts first: CALC DIM ("Accounts"); Essbase fills in dollar amounts based on the units and rates that you loaded for each month. This calculation occurs only in existing blocks; Essbase is not required to create data blocks that are a result of formulas in the Accounts dimension.

Essbase 11.1.2 Bootcamp

11-33

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Dense Dimension Calculation Process: Time

CALC DIM ("Accounts", "Year Tot");

1 1

e

bl a r fe

G

ns a r t Ess0001.pag (page onfile) n a Calculation of Year Tot s a dimension in existing ) h deฺ t input blocks e i ฺn 1. GCY->O-IBM->LB365A u t s ca ent m co Stud Ess0001.ind (index file) @ dt this e em use a r (g e to y r er cens n e r li Calculation Process: Time TDimension Dense e m raeBased on the optimal calculation order, the second dense dimension that you calculate is Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

the dimension tagged as Time. In Bigcorp Sales, this is the Year Tot dimension. You add the Year Tot dimension to your CALC DIM command, as follows: CALC DIM ("Accounts", "Year Tot"); Calculating the Year Tot dimension creates values for cells related to upper-level time periods, such as Qtr 1 or Year Tot. As with the Accounts calculation, Essbase assigns values only to cells in existing blocks and does not create data blocks.

11-34

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Sparse Dimension Calculation Process: Customer CALC DIM ("Accounts", “Year Tot”, "Customer");

3

Creation of direct Customer ancestor blocks

Channel Total

2

e

1. CY->O-IBM->LB365A

bl a r fe

G

ns a r t 2. CY->OEM->LB365A no n 1 a s 3. CY->CT->LB365A a O-IBM ) h deฺ t e i ฺn GEss0001.ind u t s Ess0001.pag ca ent m c365o A Stud Lightbolt @ dt this e em use a r (g e to y r er cens n e li Calculation Process: Customer TrDimension Sparse e m raeAfter all dense dimensions are calculated, all cells in the input blocks are fully calculated. OEM

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

At this point, you must initiate a calculation to create upper-level blocks that are based on the fully calculated input blocks. You accomplish this objective by calculating sparse dimensions. The sparse dimensions in Bigcorp Sales are Scenario, Customer, and Product. According to the optimal calculation order, you should calculate these dimensions from smallest to largest. Based on this criteria, you would choose Scenario to calculate next. However, in the Bigcorp Sales outline, all calculations in the Scenario dimension are dynamic. Thus, Scenario formulas are calculated automatically when users request data and are not stored or calculated during a batch process.

Essbase 11.1.2 Bootcamp

11-35

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Because Customer has fewer members and fewer upper-level intersections than Product, you calculate Customer next, adding the Customer dimension to the CALC DIM command, as follows: CALC DIM ("Accounts", "Year Tot", "Customer"); Unlike a dense calculation, this sparse calculation requires Essbase to create data blocks for the ancestors of O-IBM: OEM and Channel Total. Essbase creates these upper-level blocks by aggregating the data of child blocks. For example, the value for "Qtr 1" -> Units in the OEM block is the sum of the values for "Qtr 1"->Units in the O-IBM, O-Acer, O-Apple, O-AST, O-Dell, and O-HP blocks.

s

an r t n

no a • “Current Year”->”Channel Total”->”Lightbolt 365 A” as ฺ h ) t of the e deoriginal level 0 block. i These upper-level data blocks are direct customer ancestors n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr e aem • “Current Year”->”OEM”->”Lightbolt 365 A”

Gr

11-36

e

bl a r fe

In the example on the slide, when you calculate the Customer dimension, data in the level 0 block “Current Year”->”O-IBM” ->”Lightbolt 365 A” generates the following data blocks:

Essbase 11.1.2 Bootcamp

Lesson 11 Data Storage and Calculation

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Sparse Dimension Calculation Process: Product CALC DIM ("Accounts", “Year Tot”, "Customer", "Product");

3

10

2

7

11

Channel Total

12

e

8

OEM

9

bl a r fe

s

an r t n

G

n6o a as ฺ O-IBM h ) t e de i n ฺ u t Ess0001.pag as nt G c e om tudPerformance Light 365 A @cLightbolt Family Total S t s d i e th m e e ra to us g ( ry nse r e n lice e r T Sparse e Dimension Calculation Process: Product m raeIn the Bigcorp Sales database, the final dimension that you calculate is Product, as 1

4

5

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

follows:

CALC DIM ("Accounts", "Year Tot", "Customer", "Product"); During this last step, Essbase creates not only upper-level Product blocks in relation to the original input block, but also upper-level Product blocks in relation to the upper-level Customer blocks that were created when the Customer dimension was calculated. Essbase creates the upper-level Product blocks by aggregating the data of the child blocks. For example, the value for "Qtr 1"->Units in the "Family Total"->OEM block is the sum of the values of "Qtr 1"->Units in the "Lightbolt 365 A"->OEM, LIGHTBOLT->OEM, and PERFORMANCE->OEM blocks. In the example on the slide, calculating the Product dimension generates the following direct Product ancestor blocks of the original data block (“Current Year”->”O-IBM”-> ”Lightbolt 365 A”):

Essbase 11.1.2 Bootcamp

11-37

Lesson 11 Data Storage and Calculation • “Current Year”->”O-IBM”->”Lightbolt” • “Current Year”->”O-IBM”->”Performance”

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• “Current Year”->”O-IBM”->”Family Total” Calculating the Product dimension also creates the following multidimensional ancestor blocks of the original data block (where both product and customer are ancestors of the level 0 product and customer): • “Current Year”->”OEM”->”Lightbolt” • “Current Year”->”OEM”->”Performance”

e

bl a r fe

• “Current Year”->”OEM”->”Family Total” • “Current Year”->”Channel Total”->”Lightbolt” • “Current Year”->”Channel Total”->”Performance”

s

an r t n

G

o n a • “Current Year”->”Channel Total”->”Family Total” as ฺ h ) t from Not shown on the slide are product ancestor blocks generated e dealternate hierarchies i n ฺ u t in the Bigcorp Product dimension, which include the following blocks: as nt G c • “Current Year”->”O-IBM”->”Config A”com tude S dt@ thisTotal” • “Current Year”->”O-IBM”->”Configuration e em use a r • “Current Year”->”O-IBM”->”New (g e to Lines” y r er cens • “CurrentnYear”->”O-IBM”->”Line Total” e i r l T Year”->”OEM”->”Config A” e • “Current m rae • “Current Year”->”OEM”->”Configuration Total” • “Current Year”->”OEM”->”New Lines” • “Current Year”->”OEM”->”Line Total” • “Current Year”->”Channel Total”->”Config A” • “Current Year”->”Channel Total”->”Configuration Total” • “Current Year”->”Channel Total”->”New Lines” • “Current Year”->”Channel Total”->”Line Total”

11-38

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11 Data Storage and Calculation

Summary In this lesson, you should have learned to: • Describe block storage calculations

e

• Explain the default database calculation order • Identify data blocks

e

s

an r t n

no a as ฺ h • Interpret database statistics ) t e de i n ฺ u t • Identify when data blocks are created as nt G c e m udcalculation odatabase • Describe the block storage process c t S @ dt this e em use a r (g e to y r er cens n e li Tr • Explain how data blocks are indexed

m rae

bl a r fe

G

Essbase 11.1.2 Bootcamp

11-39

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 11 Data Storage and Calculation

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

11-40

Essbase 11.1.2 Bootcamp

L E S S O N

1 2

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Calculation Scripts

12

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Describe the organization of calculation scripts • Return correct calculation results

e

G

m rae

n a • Troubleshoot CALC DIM processes as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Calculation Script Organization Commenting in calculation scripts: • Improves readability • Helps organize similar calculations • Helps you plan calculation sequence

e

bl a r fe

s

an r t n

Comment Syntax

G

no a Insert comments between begin as ฺ h comment and end comment tags. ) t e de i n END COMMENT TAG---=> */ ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculation Script Organization e m raeWhen creating a large calculation script, you need to plan the process. By creating an /* "IT Exp" * (Headcount / Headcount->"All Offices"); /* Offset IT expense in Corp HQ by the sum of all allocated data */ FIX ("Corp HQ") "IT Alloc Out" = @SUMRANGE ("IT Alloc In", @IDESCENDANTS("All Offices")); ENDFIX /* Main Rollup */ /* Recalculate all dimensions outside the Baseline fix CALC DIM (Accounts, Time, Locations);

12-4

*/

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* Back Calculation */ /* Correct rates at upper levels */ ( "Discount %" = Discounts / Sales; "Tax Rate" = Taxes / "Net Income"; ) /* End of Baseline Fix */ ENDFIX

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

12-5

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Information Section Contains information about the script: • Who created it • What it does • How and when to use it • Other relevant information

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Section Information e m raeThe information section contains basic information about the calculation script. The Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

section is wholly comment-based, and you can include any information that you feel is pertinent to correctly use the calculation script. The following is a list of some items that you can include in an information section. • Script name • Name of the script creator • Date that the script was created • Purpose of the script • Directions on how to set the system before running the script (including, for example, setting values for variables or inputting data) • Version of the software for which the script was created

12-6

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts • Assumptions about the database (usually including dense-sparse configuration and attribute dimension associations)

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• Other comments • Revision history (who revised the script, when it was revised, and what was revised)

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

12-7

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Housekeeping Section • •

SET commands control how the script processes. Data manipulation commands prepare input data for calculation.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e i lSection Tr Housekeeping e m raeThe housekeeping section sets the stage for the next sequence of calculations to occur. Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

Two categories of commands are typically used in the housekeeping section: SET commands and data manipulation commands.

SET Commands SET commands prepare the calculator for proper processing of the commands in the rest of the script. You use SET commands to control, for example, parallel calculation, calculator cache size, and the display of log messages. The SET commands on the slide perform the following actions: • SET CACHE HIGH: Instructs the calculation process to use the highest calculator cache setting stored in the Essbase.cfg file. Essbase uses the calculator cache to create and track data blocks during calculation, so increasing the calculator cache setting can significantly improve calculation performance.

12-8

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• SET MSG SUMMARY: Instructs Essbase to display summary-level messages in the application log of the calculation process. The summary messages include statistics on the number of data blocks created, read, and written and on the number of data cells calculated. • SET NOTICE LOW: Instructs Essbase to use the lowest frequency of calculation completion notices stored in the Essbase.cfg file. • SET UPDATECALC OFF: Turns the intelligent calculator off. When intelligent calculation is used, Essbase calculates only blocks that were updated since the last calculation. Although intelligent calculation increases efficiency by reducing the number of blocks calculated, during calculation script development or testing, you should turn the intelligent calculator off to ensure full calculation of your script each time you run it. For a detailed description of intelligent calculation, see “Intelligent Calculation” in Lesson 15, “Developing and Testing Complex Calculation Scripts.”

ns a r t • SET CALCPARALLEL 4: Enables parallel calculation across four threads, on- in place n of the default serial calculation. This setting enables Essbase toabenefit from multiple as ฺ see the Oracle processors on the server. For information about parallel calculation, h ) t Essbase e Essbase Database Administrator’s Guide and then Oracle de Technical i ฺ u t Reference. as nt G c om tude c S Data Manipulation Commands dt@ s i e h t in a housekeeping section involves data The other type of commandecommonly m sefound a u actual data into a budget scenario or clearing all set manipulation; for (example, gr tcopying o y upper-level blocks. rr The nfollowing se table describes data manipulation commands: e n e ic re l T Command Description e m e a CLEARBLOCK ALL | UPPER | For clearing previous input or upper-level data or stored

Gr

e

bl a r fe

NONINPUT | DYNAMIC

dynamic calculations

CLEARDATA mbrName

For clearing specific members or member combinations

DATACOPY mbrName1 TO mbrName2

For copying data sets from one member to another

Essbase 11.1.2 Bootcamp

12-9

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Baseline Fix Section Beginning of a baseline fix

Internal fixes

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t Ending of a as nt G c baseline fix om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Fix Section Baseline e m raeThe baseline fix section is found near the top of most calculation scripts and defines the Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

specific focus of the script (typically defined by subsets of a time or scenario dimension). There are a number of considerations when creating a baseline fix. Focus on the type of calculation that you are performing, as follows: • Scenario: Do you want to calculate actual, budget, or forecast data? The baseline fix often includes a scenario reference because, typically, scenarios differ from each other in calculation requirements and timing. In the example on the slide, the baseline fix focuses on the Actual scenario, leaving all other scenarios uncalculated.

12-10

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 12 Creating Calculation Scripts • Time frame: Do you want to calculate only the current fiscal year, only the current period, or all time periods? The baseline fix often includes a time qualification (especially for financial applications where data is calculated only for the current time frame). In the example on the slide, the baseline fix focuses on a substitution variable called CurYear, the value of which is set by the administrator. This fix limits the calculation to a specific year, leaving all other years uncalculated. For more detail on substitution variables, see “Creating Substitution Variables” in Lesson 14, “Referencing Members in Calculations.” • Other dimensions: Do you need to limit your calculations to subsets of other dimensions? Limitation requirements vary greatly from database to database and from calculation to calculation. In the example on the slide, the IT expenses are not related to customer activity, so the baseline fix limits the calculation to a special member of the Customer dimension, a member called No Customer.

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c m ude owithin c To refine the focus of specific calculations at baseline fix, you can include fixes S @ t s inside the baseline fix. For example, section on the slide includes ed the tnormalization hi m e internal fixes to focus calculations ae o uonsa specific account or entity. r g y ( se t r r ne licen e r T e m rae

NOTE: Because Essbase requires you to reference data across all dimensions, it is common practice to add a member such as No Customer to a dimension to represent data to which the dimension does not apply.

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

12-11

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Normalization Section Prepare data for consolidation: • • •

Allocate upper-level inputs to level 0 blocks Make adjusting entries Facilitate intercompany eliminations

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Normalization Section e m raeYou may need to manipulate or normalize data before you perform your main Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

consolidation. Various circumstances may require you to normalize data:

• To allocate upper-level input data to level 0 members (such as allocating IT expenses, originally loaded to Corporate HQ, to individual offices, as in the example on the slide) • To adjust input data (such as adjusting entries during a month-end close) • To calculate intercompany eliminations • To correct or otherwise fix anomalous data (Requirements vary depending on your database architecture and data load processes.)

12-12

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

The normalization of IT expenses in the example on the slide is an allocation to individual offices. Each allocation is based on a percentage (office headcount / total corporate headcount * 100). Normalization is accomplished in three steps: 1. Headcount is aggregated across the Locations dimension and up to the All Offices member: FIX (Headcount) @IDESCENDANTS ("All Offices"); ENDFIX 2. The input data for total IT Exp is allocated from the Corp HQ location to the IT Alloc In account of each office. The allocation is based on office headcount divided by total headcount:

s

an r t n

"IT Alloc In" = "Corp HQ"->"IT Exp" * (Headcount / Headcount->"All Offices");

no a as ฺ h ) t e de i n ฺ u t as nt G c FIX ("Corp HQ") e @IDESCENDANTS("All dIn", omAlloc "IT Alloc Out" = @SUMRANGE c ("IT u t Offices")); dt@ this S e ENDFIX em use a r (g e to y r er cens n e li Tr e m

3. To ensure that IT expenses are not double-counted when the Locations dimension is consolidated, the input data for total IT Exp is offset in the Corp HQ location in an account called IT Alloc Out:

e

Gra

Essbase 11.1.2 Bootcamp

e

bl a r fe

12-13

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Main Rollup Section •

Consolidates dimensions outside the baseline fix

• •

Creates the major portion of data blocks Uses CALC DIM or CALC ALL commands

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e r li T Main Rollup Section e m raeWhen all normalization calculations are complete, you are ready to consolidate Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

dimensions with a CALC ALL, CALC DIM, or AGG command. The major portion of data blocks are built at this time. Because CALC DIM and AGG calculate the entire dimension, a CALC DIM or AGG command inside a fix statement cannot include dimensions that are referenced in the fix statement argument; the purpose of a fix is to limit calculations to specific members of a dimension. By the same logic, you cannot use CALC ALL inside fix statements. In the example on the slide, the CALC DIM command references the Accounts, Time, and Locations dimensions, but does not reference Scenario, Year, or Customer, as these dimensions are part of the baseline fix argument. The main rollup should calculate dimensions based on the optimal calculation order (that is, dense dimensions followed by sparse dimensions).

12-14

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Back Calculation Section Correct data that was consolidated incorrectly during dimension calculations:

e

bl a r fe

s

an r t n

G

no a as ฺ h ) Discounte%t aggregated dJane+ i n ฺ u t across time (Qtr 1 = G aFseb + Mar) t c n om tude c dt@ this S e em use a r (g e to y r er cens n e r li Section TCalculation Back e m raeIf you use rates as calculation drivers or store ratio or percentage calculations, you need Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

a back calculation section, to be applied after dimensions are consolidated. When following the default calculation order, Essbase incorrectly aggregates rates, ratios, and percentages at upper levels of the database. A back calculation derives or recalculates rates, ratios, and percentages, and thus corrects upper-level values.

In the example on the slide, Discount % for Jan, Feb, and Mar is aggregated across time during the main rollup, resulting in an incorrect total for Qtr 1. Creation of a back calculation is discussed in more detail later in this lesson.

Essbase 11.1.2 Bootcamp

12-15

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Returning Correct Calculation Results

O-

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c Level block @ is0 S t d e th m e e ra to us g ( ry nse r e en lice r T Returning Correct Calculation Results e m raeHow Essbase calculates data during the main rollup does not necessarily result in Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

correct data. You must identify members likely to have incorrect results and determine the best method to arrive at the correct result. Types of members to watch for: • Calculated or input rates (such as prices, cost per unit, and other drivers) • Ratio calculations (such as Profit %, Margin %, and % of Total)

12-16

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Expected Behavior

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c de om block u c t Upper-level dt@ this S e em use a r (g e to y r er cens n e li Tr Behavior Expected e m raeWhen designing a calculation script, you must understand how the calculator works Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

(expected behavior) and appreciate that calculated results, in some circumstances, do not yield correct answers (correct behavior).

How your database calculates during the main rollup phase of your calculation (using CALC ALL, CALC DIM, or AGG) is its expected behavior; expected behavior is based on outline design.

Essbase 11.1.2 Bootcamp

12-17

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

For example, the calculation proceeds in the following sequence by using the optimal calculation order for Bigcorp Sales: 1. With its units, rates, dollars, and percentages, the Accounts dimension calculates first. This calculation provides correct data for upper-level accounts across level 0 members of the other dimensions. This step creates data only for calculated accounts in level 0 intersections. 2. Input and calculated accounts are aggregated across all other dimensions in sequence. In the example on the slide, when Year Tot, Customer, and Product are calculated, rates such as List Price and Discount % are aggregated across all of those dimensions, creating nonsensical totals for every time period in the "Current Year"->"Family Total"->"Channel Total" block.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

12-18

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Correcting Calculated Percentages • •

Calculate dynamically Recalculate – Two-pass calculation – Back calculation

e

s

an r t n

Incorrect Gross Margin % after calculating dimensions

bl a r fe

G

no a as ฺ h ) et uide n Gross Margin % tcorrected ฺ s ort G by dynamic a calculation c n back calculation e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr Calculated Correcting Percentages e m raeTo return correct results for calculated percentages, you must calculate the percentage Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

or rate formula after you calculate the upper levels of every dimension. In the top example on the slide, Gross Margin % is aggregated across Jan, Feb, and Mar to produce an incorrect total in Qtr 1. In the bottom example on the slide, Gross Margin % is recalculated for Qtr 1 by dividing Qtr 1 Gross Margin by Qtr 1 Net Sales. Similarly, in upper-level blocks, where percentages are incorrectly aggregated in all time periods, you can calculate the correct Gross Margin % by dividing upper-level Gross Margin by the upper-level value for Net Sales. The key to correct percentage calculations is to ensure calculation of the percentage happens after all data is consolidated.

Essbase 11.1.2 Bootcamp

12-19

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

You can use the following methods to correct percentages: Make percentages dynamic. Instead of storing percentage calculations, you can use stored data to calculate percentages on retrieval. This is the easiest and most efficient solution, but if you have many dynamic members in your outline, especially in multiple dimensions, you can have trouble controlling the dynamic calculation order and may still see incorrect results in upper levels. You can tag dynamic members with the two-pass flag to force the formulas of the flagged members to calculate last, but in some cases the two-pass flag is not sufficient to guarantee correct calculation order. For a detailed description of dynamic calculations, see "Dynamically Calculating Data Values" in the Oracle Essbase Database Administrator’s Guide.

s

an r t n

Tag percentages for two-pass calculation. Because ratios are dependent on the calculated values of other members, you can tag them with the two-pass flag, which instructs Essbase to recalculate their formulas in a second calculation pass after the preliminary consolidation.

no a as ฺ h ) t e deALL command; when The second calculation pass is automatic when you use the CALC i n ฺ u t s include G the CALC TWOPASS using CALC DIM to consolidate dimensions, you amust t c n command to initiate the second calculation pass, asd inethe following example: om u c t @ is S /* The Main Rollup */ edt th m CALC DIM ("Accounts", "Yearse Tot", "Customer", "Product"); e ra to u g ( ry nse CALC TWOPASS; r e ren lice T e m e TIP: Never include two-pass calculation and back calculation instructions in the ra

G

same calculation script. Because they each require additional calculation passes on the data blocks, using both in one script significantly affects calculation performance. Use two-pass calculation only if back calculation is not required.

12-20

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Recalculate percentages in a back calculation section. This method is a manual version of two-pass calculation. You should use this method if back calculation of rates is required in your calculation script. The following example shows a back calculation to correct Gross Margin %: /* The Main Rollup */ CALC DIM (Accounts, "Year Tot", Customer, Product); /* The Back Calculation */ ( "Gross Margin %" = "Gross Margin" / "Net Sales"; )

e

bl a r fe

A member formula, like the one for Gross Margin % in the preceding example, is a calculation script line that is used to assign a value to a member. However, if the formula for Gross Margin % is already stored in the outline, there is no need to restate it in the calculation script.

s

an r t n

o

n a as ฺ h You can simplify the preceding example as follows: ) t e de i n ฺ u t /* The Main Rollup */ G as Product); t c n CALC DIM (Accounts, "Year Tot", Customer, om tude c /* The Back Calculatione*/ dt@ this S ( em use a r "Gross Margin %"; (g e to y r ) er cens n e li Tr e aem

Gr

Essbase 11.1.2 Bootcamp

12-21

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Design Considerations for Rates

Net Sales

(+)

Gross Sales

Net Sales (+)

Units

(~)

List Price

(^)

Discounts

(+)

Gross Sales

(+)

Discounts

(-)

Analysis Units

(-)

e

bl a r fe

(~) (~)

s

an r t n

G

no a as ฺ Discount % (*) h ) tAvg Discount e de % = i n (~) ฺ u t Discounts / Gross Sales s G a t c nInput units and dollars e m Input units and rates d o c Stu with derived dollars with derived rates @ t s d i e th m e e ra to us g ( ry nse r e n lice e r T Design e Considerations for Rates m raeWith regard to units, rates, and dollars, you can design your outline model in either of two Gross Sales

(+)

Avg List Price = (~) Gross Sales / Units

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

ways:

• Input units and rates, with calculated dollars (units * rate = dollars): This method is common in budgeting and forecast applications, where you are working with drivers rather than actual data. For example, you input budgeted units and a budgeted list price to derive budgeted dollars, as shown in the example on the left on the slide. • Input units and dollars, with derived rates (dollars / units = rate): This method is common when you work with actual data. For example, you input actual units sold and actual sales to derive an average list price, as shown in the example on the right on the slide.

12-22

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Regardless of the design, you must address the problem of aggregating rates at upper levels by using one of the following design approaches: • Tag rates to never consolidate: The never consolidate operator ( ^ ) prevents members from consolidating across any dimension, effectively avoiding the back calculation requirement. Use the never consolidate operator when a derived rate at upper levels does not provide useful data. Consider an office supply store with a product dimension that includes diverse products, such as staplers, printers, and office chairs. The price per unit for each product varies dramatically; therefore, an average price per unit for the sales total of all products is a nonsensical number.

e

bl a r fe

NOTE: The never consolidate operator ( ^ ) is available in Essbase 9.3 and later.

ns a r t • Structure your database calculation to derive rates after the mainnrollup: The o n main rollup aggregates rates at upper levels of dimensions. Therefore, if you derive a s rates after all dimensions are calculated, the result is an average rate that is based ha method ฺ ) t on aggregated totals rather than on an aggregated rate. The e that you use to e d i n ฺ u correct a rate depends on whether the rate is originally ast ntanGinput rate or a derived rate. c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr e aem

Gr

Essbase 11.1.2 Bootcamp

12-23

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Preventing Consolidation of Rates

e

Upper-level block

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Consolidation Preventing of Rates e m raeIn Release 9.3 and later, the never consolidate operator ( ^ ) gives you more control over Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

rates. In applications where rates are used solely as calculation drivers and not for analysis purposes, you can tag rates to never consolidate across any dimension. The never consolidate operator leaves rates in input cells and does not aggregate them.

The example on the slide shows an alternate Bigcorp accounts dimension hierarchy that contains the input rates List Price and Discount %, both tagged with the never consolidate operator. A full CALC ALL database calculation uses the rates to calculate the Accounts dimension formulas. It ignores the rates as it consolidates the remaining dimensions, resulting in #MISSING for upper-level intersections with the rate accounts. Consequently, you do not have to recalculate the rates at upper-level intersections, and, thus, you avoid a back calculation entirely.

12-24

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Correcting Derived Rates • •

Calculate dynamically Recalculate

Net Sales

– Two-pass calculation – Back calculation

(+)

Gross Sales

(+)

Discounts

(-)

Analysis Units

e

bl a r fe

(~) (~)

s

an r t n

G

no a as ฺ h ) tAvg Discount e de % = i n (~) ฺ u t Discounts / Gross Sales s G a t c n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Rates Tr Derived Correcting e m raeIf you want to use rates for analysis purposes or if you have a release of Essbase prior Avg List Price = (~) Gross Sales / Units

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

to 9.3, you must correct both input and derived rates by using calculation processes. The example on the slide shows a typical outline hierarchy that contains derived rates (rates used in a dollars / units = rate calculation scheme). In this sample model, Net Sales, Gross Sales, and Discounts are input members, and Avg List Price and Avg Discount % are derived using member formulas. With this type of design, you can return a correct average rate by using the following options, which are used for calculated percentages: • Dynamically calculate the rate. • Tag the rate for two-pass calculation. • Recalculate the rate in a back calculation section. The aim of all three methods is to ensure that the rates are calculated after all dimensions are consolidated.

Essbase 11.1.2 Bootcamp

12-25

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Correcting Input Rates • •

Correct with a back calculation Create shadow rates

e

bl a r fe

s

an r t n

Shadow rates, example 1

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c Shadow rates, example 2 @ is S t d e th m e e ra to us g ( ry nse r e n lice e r T Correcting Input Rates e m raeInput rates (rates used in a units * rates = dollars calculation scheme) require a different Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

calculation approach, because, unlike derived rates, they have no inherent member formulas to be recalculated after the main rollup section.

The following options are the most typical design approaches to correct input rates after consolidation: • Overwrite input rates with derived rate calculations (back calculation). • Shadow input rates in the outline with derived rate members. Overwriting Input Rates You can correct input rates by using a back calculation method that essentially overwrites input data with a derived rate formula (rate = dollars / units). This method is possible because dollars and units are aggregated correctly during the main rollup, even though rates are not.

12-26

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts The following is an example of a back calculation to correct the List Price and Discount % values in Bigcorp Sales:

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

/* The Main Rollup */ CALC DIM ("Accounts", "Year Tot", "Customer", "Product"); /* The Back Calculation */ ( "List Price" = "Gross Sales" / "Units"; "Discount %" = "Discounts" / "Gross Sales"; )

s

an r t n

no a as ฺ h ) tinput rates. e de In the first example i • Use security filters to limit metadata or read access to n ฺ u t G of the shadow rate (Avg as as ansibling on the slide, the input rate (List Price) is located t c m onuthe derate’s parent (Gross Sales), they List Price). In reports, when users drill odown c t see the incorrectly aggregateddinput t@ rateisandSthe correctly calculated shadow rate. To e th either to the data in the input rate (users avoid confusion, you canm limit usereaccess e usto the metadata for the input rate (users do not see rareport) see #NoAccess ingthe or o ( t the input rate raty all).nse r e en rates rinput lictoeanother section of the outline (for example, under a parent called • Move T e Rates), leaving the derived rate in its place. Use consolidation operators and m e a

Gr

member formulas to ensure correct calculation, as in the second example on the slide: - Gross Sales has children Units and Avg List Price. - Input Rates has the child List Price. - Gross Sales has a member formula: Units * List Price.

- Under Gross Sales, both Units and Avg List Price are marked to not consolidate (~). - Avg List Price has a member formula: Gross Sales / Units. - Both Input Rates and List Price are marked to not consolidate • If you have Release 9.3 or later, use the never consolidate operator ( ^ ) to prevent input rates from aggregating.

Essbase 11.1.2 Bootcamp

e

bl a r fe

Shadowing Input Rates with Derived Rates Instead of overwriting input data, many database designers opt to shadow input rates in the outline with calculated members. Although input rates are still aggregated incorrectly, the shadow derived rates provide average rate calculations at every level in the consolidation. To prevent users from viewing potentially confusing aggregated input rates, you can implement any of the following options:

12-27

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Troubleshooting CALC DIM Processes To ensure multiple calculation passes: • Turn off intelligent calculation. • Group back calculation formulas in parentheses. /* Housekeeping */

e

bl a r fe

SET UPDATECALC OFF; /* The Main Rollup */

s

an r t n

CALC DIM (Accounts, "Year Tot", Customer, Product);

o

n a ( as ฺ h ) "List Price"="Gross Sales"/Units; t e de i n ฺ u t "Discount %"=Discounts / "Gross Sales“ as nt G c ) om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr /* The Back Calculation */

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

Troubleshooting CALC DIM Processes e

m you consolidate a database by using the CALC DIM command, Essbase attempts eWhen a r G to calculate the database in one calculation pass. However, for a back calculation to return correct results, the formulas need to be calculated in a second pass on the data blocks. To ensure a second calculation pass, you must perform the following actions:

• Turn intelligent calculation off. Intelligent calculation marks blocks that are calculated on the first calculation pass, and does not recalculate them on a second calculation pass. For a detailed description of intelligent calculation, see “Intelligent Calculation” in Lesson 15, “Developing and Testing Complex Calculation Scripts.” • Group back calculation formulas inside parentheses ( ). Grouping formulas inside parentheses forces Essbase to perform the enclosed back-calculation formulas in a separate calculation pass. The following script shows the correct use of CALC DIM when a second calculation pass is required:

12-28

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 12 Creating Calculation Scripts /* Housekeeping */ SET UPDATECALC OFF; /* The Main Rollup */ CALC DIM (Accounts, "Year Tot", Customer, Product); /* The Back Calculation */ ( "List Price"="Gross Sales"/Units; "Discount %"=Discounts / "Gross Sales“ )

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

12-29

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Viewing Calculation Messages

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculation Viewing Messages e m raeWhen you calculate a database, Essbase displays the calculation order of the Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

dimensions for each pass through the database, and tells you how many times Essbase cycled through the database during the calculation. Essbase displays this information in the application log. To view calculation messages: 1. In the navigation panel of Administration Services Console, select an application node. 2. Select Actions, then View, and then Log for “AppName.” The Log Viewer Options dialog box is displayed. 3. Select one of the following options: • To display the entire application log file, select Display log.

12-30

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts • To display only a specific date, select Starting date, and, from the drop-down list, select a date.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

4. Click OK. Log Viewer is displayed. You can scroll to the end of the log file to view the most recent log messages.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

12-31

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Single-Pass Calculation with Incorrect Results

/* The Main Rollup */ CALC DIM ("Accounts", "Year Tot", "Customer", "Product");

Single-pass calculation script

/* The Back Calculation */ "List Price"="Gross Sales"/ "Units";

e

bl a r fe

"Discount %"="Discounts" / "Gross Sales";

s

Incorrect upper-level block

an r t n

G

no a as ฺ h ) t e de i Incorrect n ฺ u t upper-level as nt G c block om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Single-Pass Calculation with Incorrect Results e m raeThe Bigcorp Sales database uses the input rates List Price and Discount % to calculate Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

Gross Sales and Discounts, respectively. Input rates require a back calculation to correct the values aggregated to upper levels. However, the following calculation script results in a single database pass: /* Housekeeping */ SET UPDATECALC OFF; /* The Main Rollup */ CALC DIM ("Accounts", "Year Tot", "Customer", "Product"); /* The Back Calculation */ "List Price" = "Gross Sales" / "Units"; "Discount %" = "Discounts" / "Gross Sales";

12-32

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 12 Creating Calculation Scripts When you run the script, Essbase performs all dense calculations in input-level blocks, including the formulas for List Price and Discount %. Then it performs all sparse calculations, creating upper-level blocks in which rates are aggregated. Among the application log messages for this procedure is the following message, which shows a single calculation pass: [Thu Aug 25 11:51:56 2005]Local/Bigcorp/Sales/trnadmin/Info(1012669) Calculating [ Accounts(All members) Year Tot(All members) Accounts(List Price,Discount %) Customer(All members) Product(All members)]

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

12-33

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Multiple-Pass Calculation with Correct Results /* The Main Rollup */ CALC DIM ("Accounts", "Year Tot", "Customer", "Product"); /* The Back Calculation */ (

Multiple-pass calculation script

"List Price" = "Gross Sales" / "Units"; "Discount %" = "Discounts" / "Gross Sales";

e

bl a r fe

)

s

an r t n

G

no a as ฺ h ) t e de i n ฺ Correct upperu t as nt G level block c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Multiple-Pass Calculation with Correct Results e m raeWhen you enclose the back calculation in parentheses, you force Essbase to perform a Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

second calculation pass. It performs the dense calculations in input-level blocks, creates upper-level blocks, and then, in a second calculation pass, derives List Price and Discount % in all resulting blocks. The following example shows the modified script: /* Housekeeping */ SET UPDATECALC OFF; /* The Main Rollup */ CALC DIM ("Accounts", "Year Tot", "Customer", "Product"); /* The Back Calculation */ ( "List Price" = "Gross Sales" / "Units"; "Discount %" = "Discounts" / "Gross Sales"; )

12-34

Essbase 11.1.2 Bootcamp

Lesson 12 Creating Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Among the application log messages for this procedure are the following messages, which show two calculation passes: [Thu Aug 25 14:54:17 2005]Local/Bigcorp/Sales/trnadmin/Info(1012669) Calculating [ Accounts(All members) Year Tot(All members) Customer(All members) Product(All members)] [Thu Aug 25 14:54:18 2005]Local/Bigcorp/Sales/trnadmin/Info(1012669) Calculating [ Accounts(List Price,Discount %)]

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

12-35

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 12 Creating Calculation Scripts

Summary In this lesson, you should have learned to: • Describe the organization of calculation scripts

e

• Return correct calculation results

s

• Troubleshoot CALC DIM processes

e

m rae

bl a r fe

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

12-36

Essbase 11.1.2 Bootcamp

L E S S O N

1 3

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Controlling the Calculation Process

13

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Describe top-down calculation • Focus calculations with FIX statements

e

G

m rae

n a • Calculate conditionally with IF statements as ฺ h ) tand IFide • List performance considerations for FIX e n ฺ u t s G a t c n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 13 Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Top-Down Calculation Dense member formulas are calculated in every existing data block. "Net Sales" = "Gross Sales"–Discounts;

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c mmemory Page file Blocksoin Page file de u c t before calculation for calculation after calculation S s dt@ i e h m se t e a gr to u ( y rr nse e n e ce i r l T Top-Down Calculation e m raeIn contrast to spreadsheet formulas, in which every calculated cell needs a formula, the Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

Essbase block storage database calculator has a top-down approach to calculation. Unless otherwise restricted, a dense member formula in a calculation script is executed in every data block in the database. For example, each data block in the Bigcorp Sales database has 17 cells for Net Sales, one for each time period. The following member formula is executed for each intersection of Net Sales with a time period in every existing data block: "Net Sales" = "Gross Sales" - Discounts; If 5000 data blocks exist, Essbase calculates 850,000 cells (17 cells in 5000 blocks) with one line of script. This top-down calculation capability enables you to accomplish a large amount of computing while writing and debugging only a few lines of script.

13-2

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

A major element of calculation script drafting is understanding how to focus top-down calculations. Essbase provides three principal methods for focusing calculations:

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• FIX statements • IF conditional statements • Cross-dimensional operators (->)

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

13-3

Lesson 13 Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Focusing Calculations with FIX Statements •

FIX syntax: FIX(FixMbrs) commands;

FIX calculates commands only for restricted members

ENDFIX

• •

Member Set functions AND or OR connectors

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculations Focusing with FIX Statements e m raeFIX is one of three principal methods in block storage database calculations for focusing Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

the scope of calculations. A FIX statement restricts database calculations to a subset of the database. All commands nested between the FIX and ENDFIX commands are restricted to the specified database subset. A complete FIX statement has the following syntax: FIX (fixMbrs) Commands; ENDFIX

The fixMbrs argument is a member name or a list of member names from any number of database dimensions. fixMbrs can also contain AND and OR operators and member set functions: • AND and OR operators: Use the AND operator when all conditions must be met. Use the OR operator when one of several conditions must be met.

13-4

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• Member set functions: Use to build member lists. The following quick-reference table shows the most commonly used member set functions. For details about each function, see the Oracle Essbase Technical Reference. Function

Return Value

@ALLANCESTORS(member)

All ancestors of member (including ancestors of any shared instance of member)

@CHILDREN(member)

Children of member

@DESCENDANTS(member, distance)

All descendants of member or all descendants of member down to an optional specified distance

@SIBLINGS(member)

Siblings of member

@UDA(dimension, UDA)

Members of dimension that have UDA

@ATTRIBUTE(AttributeMember)

All base members that are associated with AttributeMember

e

bl a r fe

s

an r t n

Gr

no a as ฺ Member set functions that start with an "I" (for example, @ICHILDREN or h ) t e @ISIBLINGS) include the input member in the listnofegenerated members. id ฺ u t s G ca ent m FIX Example co Stud @ dt this Consider the following script example: e em use a FIX("Budget", @ICHILDREN("Retail")) r (=g "Gross toSales"–"Discounts"; "Net Sales" y e r r ns ENDFIXene e c li Tr e The calculation for Net Sales is restricted to Budget data blocks and to the customer aem

Retail and its children. The member set function @ICHILDREN dynamically references multiple members, and the comma between Budget and @ICHILDREN(Retail) serves as an AND connector.

FIX Considerations When using FIX statements in your calculation script, keep the following in mind: • You can nest FIX statements within FIX statements without limitation, as in the following example: FIX("Current Year", "Feb") FIX("Net Sales") CALC DIM ("Product", "Customer"); ENDFIX

Essbase 11.1.2 Bootcamp

13-5

Lesson 13 Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

("List Price" = "Gross Sales" / "Units";) ENDFIX • Members listed in the fixMbrs argument are not calculated by the FIX statement, but serve to focus the calculations inside the FIX statement. • If members of a dimension are listed in the fixMbrs argument, you cannot calculate members from that dimension in FIX statement commands. In the following example, the Year Tot dimension member Jan is one of the fixMbrs arguments. This argument uses a Year Tot dimension member to focus calculations, so including Year Tot in the CALC DIM command is not valid: FIX("Current Year", "Jan") CALC DIM ("Accounts", "Year Tot", "Customer", "Product"); ENDFIX

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

13-6

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Calculating Conditionally with IF Statements •

IF syntax: IF (condition)

IF tests for the condition, and applies calculations if true.

member formulas; [ELSEIF (condition) member formulas;]

e

bl a r fe

[ELSE member formulas;] ENDIF

s

an r t n

G

no a as ฺ • Boolean functions h ) t e de i • Syntax requirements n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculating Conditionally with IF Statements e m raeThe second method for focusing calculations is an IF statement, which performs Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

conditional tests within a formula. Using an IF statement, you can define Boolean tests, as well as formulas, to be calculated if the test returns a TRUE or a FALSE value. An IF statement has the following syntax: IF (condition) member formulas; [ELSEIF (condition) member formulas;] [ELSE member formulas;] ENDIF

Essbase 11.1.2 Bootcamp

13-7

Lesson 13 Controlling the Calculation Process The condition argument is a formula or function that returns a Boolean value of TRUE (a nonzero value) or FALSE (a zero value). The following are examples of valid conditions:

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• "Net Sales" > 10000: Returns a TRUE result if Net Sales is over 10000. • Units = = 1000: Returns a TRUE result if Units is equal to 1000.

TIP: Use double equal signs (= =) in conditions to test for equality. In calculation scripts, a single equal sign (=) assigns a value to a member.

• @ISMBR(Jan): Returns a TRUE result if the member being calculated is Jan. (The function @ISMBR is one of many Boolean functions available for conditional testing.)

s

an r t n

You can include additional conditions by adding an ELSEIF branch to the IF statement, and you can define commands to be executed when none of the conditions is true by including an ELSE branch in the IF statement.

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

13-8

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Boolean Functions

TRUE

TRUE

Is the current customer a child of OEM?

Discounts="Gross Sales" * "OEM Disc%";

TRUE

Is the current product level 0?

FALSE

FALSE

No calculation

e

Is the current customer a child of Retail?

FALSE

bl a r fe

s

an r t n

G

no a as ฺ h ) et uide Discounts="Gross Sales" * tฺn Discounts="Gross G * "Discount %"; "Retail Disc%" as nSales" t c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Functions Boolean e m raeEach Boolean function is a test that returns TRUE or FALSE (1 or 0, respectively). You Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

can use Boolean functions in conjunction with the IF command to provide a conditional test that is based on characteristics of the current member combination.

For example, if you want to restrict calculation to level 0 members of a dimension, you can use @ISLEV(dimName, 0) for the conditional test in your IF statement. If one of the function parameters is a cross-dimensional member—for example, @ISMBR(Jan->Budget)—all parts of the cross-dimensional member must match all parts of the current cell to return a value of TRUE.

Essbase 11.1.2 Bootcamp

13-9

Lesson 13 Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Boolean Function List All Boolean functions start with @IS, indicating a conditional test. The following quickreference table shows the most commonly used Boolean functions. For detailed descriptions of each function, see the Oracle Essbase Technical Reference. Function

Condition Tested

@ISCHILD(member)

Whether the current member is a child of member

@ISDESC(member)

Whether the current member is a descendant of member

@ISICHILD(member)

Whether the current member is a child of member or is member

@ISIDESC(member)

Whether the current member is a descendant of member or is member

@ISGEN(dimension, generation)

Whether the current member of dimension is in generation

ns a r t @ISLEV(dimension, level) Whether the current member of dimension is in level onn a s a Boolean Function Example ) h deฺ t e Consider a calculation where discounts are calculated 0i products, using rates ฺnfor level u t s G t that depend on the customer type. To accomplish the Essbase calculator cathis calculation, n e m d o must essentially ask the following questions and act accordingly based on the c Stu @ responses: dt this e m sIfeso, continue to question 2. If not, continue to the 1. Is the product a levelra 0e product? u g o t next product.ry ( r se e n n e e 2. Is thercustomer c OEM customer? If so, calculate Discounts using the OEM lian T e discount percent. If not, continue to question 3. m e ra

G

3. Is the customer a Retail customer? If so, calculate Discounts using the retail discount percent. If not, calculate Discounts using the standard discount percent.

The slide shows a diagram of the preceding questions. These questions can be translated into the following IF logic, which uses Boolean functions for conditions: IF(@ISLEV("Product",0)) IF (@ISCHILD("OEM")) "Discounts" = "Gross Sales" * "OEM Disc%"; ELSEIF (@ISCHILD("Retail")) "Discounts" = "Gross Sales" * "Retail Disc%"; ELSE "Discounts" = "Gross Sales" * "Discount %"; ENDIF ENDIF

13-10

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Syntax Requirements Same IF statement in a calculation script

IF statement in an outline mem ber formula Units (

IF(@ISMBR(Budget)) Units = "Prior Year" * 1.1; "List Price" = "Prior Year" * 1.25;

e

bl a r fe

G

ns a r t "Discount %" = "Prior n o n Year" * .90; a s a ENDIF ) h deฺ t e ) ฺn Gui t s ca ent m co Stud @ dt this e em use a r (g e to y r er cens n e li TrRequirements Syntax e m raeIn an outline member formula, an IF statement can assign values to members in addition Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

to the member that you are calculating. The left example on the slide shows the following IF statement in the outline member formula for Units: IF (@ISMBR("Budget")) "Units" = "Prior Year" * 1.1; "List Price" = "Prior Year" * 1.25; "Discount %" = "Prior Year" * .90; ENDIF

The IF statement assigns a value not only to Units but also to List Price and Discount %. During an outline calculation, when Essbase calculates Units, it evaluates the condition in the IF statement (whether the scenario is Budget), and then assigns values to all three accounts if the condition is true.

Essbase 11.1.2 Bootcamp

13-11

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 13 Controlling the Calculation Process However, when used in calculation scripts, you must use a construction called a calculation member block. A calculation member block relates a group of formulas to a single member, thus creating a process similar to the one described in the preceding example, where a single member formula assigns values to multiple members. The syntax requirements for a calculation member block: • You must enclose IF statements in parentheses. • You must precede the open parentheses with a single anchor member name (without a semicolon). As a best practice, use the member that is specified in the first member formula calculated inside the block as the anchor member.

s

an r t n

no a as ฺ h ) tstatement e deas the first example, i On the slide, the example on the right shows the same IF n ฺ u t Gmember formula, as follows: asan outline but this time used in a calculation script insteadcof t n om tude c Units dt@ this S ( e IF (@ISMBR("Budget")) em use a r "Units" =(g "Prior tYear" o * 1.1; y e r "List Year" * 1.25; er Price" ns== "Prior n e e c "Discount %" "Prior Year" * .90; r li T ENDIF e m e ) a

Gr

13-12

e

bl a r fe

TIP: Each calculation member block represents a separate calculation pass on the data blocks, so, for the sake of efficiency, collect all IF statements in one calculation member block. You can enclose an unlimited number of IF statements in a single calculation member block.

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Considering Performance with IF Statements •

Number of data blocks processed



Number of calculation passes on data blocks

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e i lPerformance Tr Considering with IF Statements e m raeWith some exceptions, you can achieve the same calculation results with either FIX or IF Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

statements. The guidelines for when to use FIX and when to use IF are performancerelated. Using IF when you should use FIX or FIX when you should use IF seriously affects calculation performance. The performance differences between the statements are determined by how many data blocks are affected and how many calculation passes are required.

Essbase 11.1.2 Bootcamp

13-13

Lesson 13 Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Number of Data Blocks Processed • • •

IF processes all data blocks through memory. FIX on dense members processes all data blocks through memory. FIX on sparse members restricts data blocks processed.

e

bl a r fe

FIX on sparse mem bers

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c de omblocks Page file Restricted Page file u c t S @ before calculation in memory for calculation after calculation dt this e em use a r (g e to y r er cens n e Tr of Datali Blocks Processed Number e m raeFIX statements are index-driven; thus, the members on which you fix determine which Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

data blocks are brought into memory for the purpose of calculating the commands inside the FIX statement. For example, in Bigcorp Sales, the Scenario dimension is sparse. Therefore, in the following script, only data blocks with Current Year as part of their index entry are brought into memory for calculation; data blocks for Forecast, Budget, and Prior Year are bypassed. FIX ("Current Year") CALC DIM (Accounts, "Year Tot", Product, Customer); ( "List Price" = "Gross Sales" / Units; ) ENDFIX

13-14

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

TIP: While fixing on sparse dimension members limits the data blocks to be calculated, fixing on dense dimension members does not. Dense dimension members exist in every data block.

By contrast, IF is not index-driven; IF statements are interpreted formulas, executed inside a calculation member block. Thus, all data blocks are brought into memory when IF logic is applied, regardless of whether the condition is based on sparse or dense dimension members.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

13-15

Lesson 13 Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Number of Calculation Passes • •

Multiple FIX statements require multiple calculation passes. Multiple IF statements in a single calculation member block requires only one calculation pass.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr of Calculation Number Passes e m raeIn general, each FIX statement represents one calculation pass. Similarly, each Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

calculation member block is one calculation pass. However, because a single calculation member block can contain an unlimited number of IF statements, you can evaluate multiple conditions in one pass. This behavior becomes especially important when you evaluate multiple dense dimension conditions. Calculation Passes Example Consider a calculation requirement stating that in September, Units is equal to August units, and, in October, Units is equal to 110% of August units. The following example achieves the calculation results with IF statements: Units ( IF(@ISMBR(Sep)) Units=@PRIOR(Units, 1);

13-16

Essbase 11.1.2 Bootcamp

Lesson 13

Controlling the Calculation Process

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

ENDIF IF(@ISMBR(Oct)) Units=@PRIOR(Units, 2)*1.1; ENDIF ) Next, an example of the same calculation, using FIX statements: FIX (Sep) Units=@PRIOR(Units, 1); ENDFIX FIX (Oct) Units=@PRIOR(Units, 2)*1.1; ENDFIX

e

bl a r fe

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use Internal Fixes a r g Internal fixes are FIX(statements to nested inside other FIX statements, which represent y e r calculation passes er only nonsthe blocks already designated by the outer FIX statement. For n e e c li script represents one calculation pass on all the data blocks example, Trthe following e (based m on the dense outer FIX) and two sub-passes on select blocks during the main e a r pass (based on the sparse internal fixes): In the IF example, all data blocks are brought into memory, and, as each block is processed, Essbase assigns values to September and October. In the FIX example, two statements and, thus, two passes through the database are required. During each pass, all data blocks are brought into memory because Year Tot is a dense dimension. Obviously, in this situation, an IF statement results in much better performance than a FIX statement.

G

FIX (Sep) FIX (@CHILDREN("OEM")) Units=@PRIOR(Units, 1); ENDFIX FIX (@CHILDREN("Retail")) Units=@PRIOR(Units, 1)*1.1; ENDFIX ENDFIX

Essbase 11.1.2 Bootcamp

13-17

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 13 Controlling the Calculation Process Other Considerations IF statements must be executed within a calculation member block. Within a calculation member block, you can execute only member formulas. Thus, in an IF statement, you cannot use calculation commands such as CALC ALL, CALC DIM, AGG, or FIX. However, you can use IF statements as commands inside FIX statements. Guidelines for FIX and IF Keep the following guidelines in mind: • Use FIX statements when the arguments are members of sparse dimensions. • Use IF statements when the arguments are members of dense dimensions.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

13-18

e

bl a r fe

• To reduce the number of calculation passes, use IF statements even with sparse dimensions.

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 13

Controlling the Calculation Process

Summary In this lesson, you should have learned to: • Describe top-down calculation

e

• Focus calculations with FIX statements

s

• Calculate conditionally with IF statements

e

m rae

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr • List performance considerations for FIX and IF

bl a r fe

G

Essbase 11.1.2 Bootcamp

13-19

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 13 Controlling the Calculation Process

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

13-20

Essbase 11.1.2 Bootcamp

L E S S O N

1 4

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Referencing Members in Calculations

14

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Reference members explicitly and dynamically • Create calculation variables

e

G

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Referencing Members Explicitly

1

2

e

bl a r fe

3

s

an r t n

G

no a as ฺ h ) t Mix byidCust e calculation e Data blocks Unit n ฺ u t G1 Units / Block 3 Units as 1. nBlock t 1. Current Year->O-IBM->Family Total c m ude2. Block 2 Units / Block 3 Units 2. Current Year->OEM->Family Total oTotal c t 3. Block 3 Units / Block 3 Units 3. Current Year->Channel Total->Family S @ t s ed thi m e use a r (g e to y r er cens n e li Tr Referencing Members Explicitly e m raeAnother method for focusing the scope of calculations is to use cross-dimensional Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

operators to reference specific member combinations.

FIX and IF statements are typically used to focus a series of member formulas. Crossdimensional operators are used within a single member formula. The syntax rules for cross-dimensional operators are as follows: • A cross-dimensional operator is a minus sign ( - ) followed by a greater-than sign ( > ), with no space between the signs. • Cross-dimensional operators connect members from different dimensions (for example, "Current Year" ->"Units"->"Jan"). No spaces are allowed between member names and cross-dimensional operators. • The order of members has no bearing on calculation. "Jan"->"Units" operates the same as "Units"->"Jan." • A cross-dimensional statement can have only one member from each dimension. There can be as many members in the statement as there are dimensions. 14-2

Essbase 11.1.2 Bootcamp

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Used in formulas, the cross-dimensional operator focuses the calculation on specific member combinations. In the example on the slide, Bigcorp analysts want to calculate the ratio of units sold to individual customers to the units sold to all customers. The following table lists three sample blocks and the preferred calculation in each block: Block Number

Block Name

Preferred Calculation

1

“Current Year”->”O-IBM”->”Family Total”

Block 1 Units / Block 3 Units

2

“Current Year”->”OEM”->”Family Total”

Block 2 Units / Block 3 Units

3

“Current Year”->”Channel Total”->”Family Total”

Block 3 Units / Block 3 Units

e

G

bl a r In each calculation, notice that the denominator in the ratio must come from the Channel fe s n Total block. Using the following formula, you facilitate cross-block calculations: tra n no "Unit Mix by Cust" = "Units" / "Units"->"Channel Total"; a asfor any h Essbase uses the members of the cell currently being calculated ฺ dimensions that ) t e e d i n are not referenced explicitly in the cross-dimensional u For example, when tฺstatement. s G a t Essbase calculates Unit Mix by Cust for January Year”->Acer->”Lightbolt c in thee“Current n m d o 365 A” data block, it executes the following calculation: c Stu @ t d this e Units->Jan->"Current Year"->Acer->"Lightbolt 365 A" / em use Units->Jan->"CurrentraYear"->"Channel Total"->"Lightbolt 365 A" (g e to y r The member names r in italics s are specific to the current cell, and change as the cell being e n n e calculated rechanges.lic T e m e ra NOTE: The formula for Unit Mix by Cust is a calculated percentage that is dependent on upper-level consolidated data. You must therefore follow the rules for calculated percentages when considering the calculation order of the formula. For a comprehensive discussion of calculated percentages, see “Correcting Calculated Percentages” in Lesson 12, “Creating Calculation Scripts.”

Essbase 11.1.2 Bootcamp

14-3

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Referencing Members Dynamically

1

2

e

3

4

bl a r fe

s

an r t n

G

no a habysChan ฺ calculation Unitt)Mix Data blocks e e d i n 1. Current Year->O-IBM->Family Total u1 Units / Block 2 Units tฺ 1. Block s G a t 2. Current Year->OEM->Family Total 2.nBlock 2 Units / Block 2 Units c e m 3. Current Year->R-Great Buys>Family Total 3. Block 3 Units / Block 4 Units d o u c t 4. Current Year->Retail->Family Total @ is S 4. Block 4 Units / Block 4 Units t d e th m e e ra to us g ( ry nse r e en lice r T Referencing Members Dynamically e m raeAlthough the cross-dimensional operator is useful for fixed references in calculations, Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

many common calculations require a more dynamic approach. Essbase has an inherent understanding of member position and member relationships within the dimension hierarchy, and provides two categories of functions that take advantage of this understanding: • Member set functions: Generate lists of members based on input values • Relationship functions: Find values in related members based on the position of the current member

14-4

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 14 Referencing Members in Calculations In the example on the slide, Bigcorp analysts want another Unit Mix ratio, but Unit Mix by Chan is based on the units of the current customer in relation to the units of the channel of the current customer: OEM customers in relation to the OEM total, Retail customers in relation to the Retail total, and so on. The following table lists four sample blocks and the preferred calculation in each block: Block Number

Block Name

Preferred Calculation

1

“Current Year”->”O-IBM”->”Family Total”

Block 1 Units / Block 2 Units

2

“Current Year”->”OEM”->”Family Total”

Block 2 Units / Block 2 Units

3

“Current Year”->”R-Great Buys”->”Family Total”

Block 3 Units / Block 4 Units

4

“Current Year”->”Retail”->”Family Total”

Block 4 Units / Block 4 Units

e

bl a r fe

s

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

Notice that the denominator of the ratio calculation varies based on the hierarchy branch of the current member. You can provide the ratio that Bigcorp analysts want by using member set functions or relationship functions.

e

m rae

G

Essbase 11.1.2 Bootcamp

14-5

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Referencing Sets of Members Member Set functions: • Generate a list of members for calculation • Are commonly used as arguments in FIX statements and other functions FIX(@ICHILDREN(OEM)) Member set functions used in FIX statements

"Unit Mix by Chan" = "Units" / "Units"->"OEM";

e

s

an r t n

ENDFIX FIX(@ICHILDREN(Retail))

bl a r fe

G

no a as ฺ ENDFIX h ) t e de FIX(@ICHILDREN(Distributor)) i n ฺ u t as nt G "Unit Mix Chan" = "Units" / "Units"->"Distributor"; c om tude ENDFIX c dt@ this S e em use a r (g e to y r er cens n e li of Members Tr Referencing Sets e m raeA member set function returns a list of members, based on the function that you use and "Unit Mix by Chan" = "Units" / "Units"->"Retail";

Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

the member that you specify in the function. When you use a member set function as part of a formula, Essbase generates the list of members dynamically from the outline hierarchy before the calculation begins. The list is based on the specified member and is independent of the current member being calculated. Member set functions are commonly used as arguments in FIX statements, because they provide a way to reference many members without specifying every member name.

NOTE: To see a quick-reference table of the most commonly used member set functions, see “Focusing Calculations with FIX Statements” in Lesson 13, “Controlling the Calculation Process.”

14-6

Essbase 11.1.2 Bootcamp

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

The following script example shows how to return a correct Unit Mix by Chan ratio for each channel: FIX(@ICHILDREN(OEM)) "Unit Mix by Chan" = "Units" / "Units"->"OEM"; ENDFIX FIX(@ICHILDREN(Retail)) "Unit Mix by Chan" = "Units" / "Units"->"Retail"; ENDFIX FIX(@ICHILDREN(Distributor)) "Unit Mix Chan" = "Units" / "Units"->"Distributor"; ENDFIX

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c m udiseto use generation or level NOTE: Another way to generate a listcofomembers t S @ t ranges, which return a sequential set of members, all from one dimension s d thi e m sameselevel or generation. The : operator returns leveland all residing atethe a u operator returns generation-based ranges. For r based ranges, :: g and the o ( t y example, rr in Bigcorp se Sales, Jan:Dec returns all level 0 time periods from Jan e n n e Dec. e rthrough lic The statement “O-IBM”::”R-Gateway” returns all generation 4 T e customers from O-IBM through R-Gateway. m e a

While this approach returns correct results, it requires many lines of repetitive script and has a higher maintenance cost. If you add a channel to your outline, you must add a FIX statement to your script. In this instance, relationship functions provide a better solution.

Gr

Essbase 11.1.2 Bootcamp

e

bl a r fe

Each FIX statement focuses on a channel and its children by using the member set function @ICHILDREN. Inside the FIX statement, Unit Mix by Chan is calculated with a cross-dimensional reference to the channel that is the focus of the current FIX statement.

14-7

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Referencing Related Members Reference values related to the current member: • Parents • Ancestors at a specific level or generation

e

Generation 3 customers

bl a r fe

s

an r t n

G

no a as ฺ Relationship function used h ) in a member formula t e de i n ฺ u t as nt G c "Unit Mix by Chan" = "Units" / om de u c t @ANCESTVAL("Customer",3,"Units"); dt@ this S e em use a r (g e to y r er cens n e li Tr Referencing Related Members e m raeBased on the current cell location and a series of input parameters, relationship functions Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

look up specific values in the database. The functions have an implicit current member argument; that is, they are dependent on the position of the member currently being calculated.

14-8

Essbase 11.1.2 Bootcamp

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

The following quick-reference table shows the most commonly used relationship functions. For details about each function, see the Oracle Essbase Technical Reference. Function

Return Value

@ANCESTVAL(dimension, GenLevNum [, member])

Value of member from the GenLevNum (generation or level specification) ancestor of the current member of dimension. For example, @ANCESTVAL(Product, 3, "Net Sales") returns the Net Sales account value from the generation 3 ancestor of the current Product member.

@PARENTVAL(dimension [, member])

Value of member from the parent of the current member of dimension. For example, @PARENTVAL(Customer, Units) returns the Units account value from the parent of the current Customer member.

s

an r t n

In the Unit Mix by Chan example for Bigcorp Sales, you want to divide each customer’s units by the total units for the customer’s channel, and you want to reflect a value of 100% for each channel. Because all customer channels are generation 3 members of the Customer dimension, you can accomplish both objectives with the following line of script, which uses a relationship function:

no a as ฺ h ) t e de i n ฺ u t as nt G 3, Units); "Unit Mix by Chan" = Units / @ANCESTVAL(Customer, c om tude c For example, when Essbase calculates @ UnitisMixSby Chan for January in the edt 365 “Current Year” -> “O-Acer” ->m “Lightbolt th A” data block, it executes the following e e calculation: ra to us g ( ry nseYear"->"O-Acer"->"Lightbolt 365 A" / r Units->Jan->"Current e Units->Jan->"Current ren lice Year"->OEM->"Lightbolt 365 A" T ewhen Essbase calculates Unit Mix by Chan for January in the m And, e ra

G

“Current Year” -> “R-Gateway” -> “Thunderball 540 S” data block, it executes the following calculation: Units->Jan->"Current Year"->"R-Gateway"->"Thunderball 540 S" / Units->Jan->"Current Year"->Retail->"Thunderball 540 S"

Essbase 11.1.2 Bootcamp

e

bl a r fe

14-9

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Calculation Variables • •

Temporary variables Substitution variables

e

bl a r fe

s

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculation Creating Variables e m raeIn the calculation process, Essbase supports two types of variables:

G

an r t n

Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

• Temporary variables store the results of intermediate calculations (supported only in calculation scripts). • Substitution variables substitute for a text or numeric value stored on Essbase Server (supported in calculation scripts and other interfaces).

14-10

Essbase 11.1.2 Bootcamp

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Temporary Variables • • •

Store intermediate calculations Reduce script complexity Improve performance

e

bl a r fe

VAR

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Temporary Creating Variables e m raeYou can declare temporary variables and set their values in calculation scripts to store Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

the results of intermediate calculations.

Values stored in temporary variables exist only while the calculation script is running; thus, you cannot report the values of temporary variables. The benefits of temporary variables are twofold: • You need to create and validate a complex formula only once, in your variable definition, rather than repeating and revalidating the formula multiple times in one calculation script. • Essbase calculates a complex formula only once for each data block, regardless of how many times the script references the formula, thereby reducing calculation time. Setting up and using temporary variables involves three steps:

Essbase 11.1.2 Bootcamp

14-11

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 14 Referencing Members in Calculations 1. Declare variables. In the housekeeping section of the calculation script, use the VAR (not @VAR) command and a variable name of your own construction. For example, you develop a script in which you want to create a variable numeric constant for TaxRate. In the script, you allocate budget data for multiple accounts based on a standard allocation ratio, so you create a variable to temporarily store the allocation ratio. In the following example, both variables are declared. /* Housekeeping */ /* Declare Variables */ VAR TaxRate; VAR AllocUnits; 2. Assign values to variables. For a numeric-constant variable, you can assign a value when you declare the variable or you can assign it with a member formula. For variable definitions that reference member names in the outline, the definition must follow the syntax rules of calculation member blocks. In the following example, the TaxRate variable is assigned a numeric value in the housekeeping section, but the allocation ratio is defined later in the script in a calculation member block.

s

an r t n

no a as ฺ h ) t /* Housekeeping */ e ide n ฺ u /* Declare and Define Variables */ ast G t c n VAR TaxRate = .0825; om tude c VAR AllocUnits; dt@ this S ... e em use a r "Units" (g e to y r ( er= "Units" ns / "Units"->"Family Total"->"Channel Total"; n e AllocUnits e c r li )e T aem

Gr

3. Use predefined variable values in subsequent member formulas. After defining a variable, you can use the variable name wherever the variable definition is required. In the following example, taxes are calculated using the TaxRate variable, and costs are allocated using the AllocUnits variable. /* Housekeeping */ /* Declare and Define Variables */ VAR TaxRate = .0825; VAR AllocUnits; ... "Units" ( AllocUnits = "Units" / "Units"->"Family Total"->"Channel Total"; "Material Costs" = "Material Costs"->"Family Total"->"Channel Total" * AllocUnits;

14-12

e

bl a r fe

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 14 Referencing Members in Calculations "Labor Costs" = "Labor Costs"->"Family Total"->"Channel Total" * AllocUnits; "Overhead Costs" = "Overhead Costs"->"Family Total"->"Channel Total" * AllocUnits; ... ) "Taxes" = "Profit" * TaxRate;

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

14-13

Lesson 14 Referencing Members in Calculations

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Substitution Variables

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i Substitution Variables dialog box n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Substitution Creating Variables e m raeSubstitution variables act as global placeholders for information that changes regularly. Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

For example, in a calculation script, if you want to calculate the current month, you must update the script manually every month. With a substitution variable set on the server, such as CurMonth, the value identified as the current month is changed each month. You use the variable name in your calculation script, and the information is dynamically updated when you run the calculation.

The benefit of using substitution variables for values that change over time is that you maintain the variable in one place, rather than in multiple calculation scripts, spreadsheets, reports, formulas, and security definitions; thus, you reduce maintenance requirements. Unlike temporary variables, you can use substitution variables not only in calculation scripts but also in most reporting interfaces. Essbase Release 9.0 and later also supports the use of substitution variables in the following areas:

14-14

Essbase 11.1.2 Bootcamp

Lesson 14 Referencing Members in Calculations • Outline member formulas • Security filters

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• Partition definitions • MDX statements • Rules file specifications for data source name (DSN) definitions when using SQL Interface • Rules file field definitions Setting up Substitution Variables You can create and set substitution variables on the Essbase server by using Administration Services Console, MaxL, or ESSCMD. Set the variable at any of the following levels:

s

an r t n

no a as ฺ h ) t e dedatabases within the i n • Application: this level provides access to the variable from all ฺ u t as nt G application. c om tude c • Database: this level provides access dt@ thtoistheSvariable only from the specified e database. em use a r (g e to y r To create and set substitution variables in Administration Ser vices r s e n n e Console: re lic T e the navigation panel of Administration Services Console, select an Essbase server 1. In m e ra node. • Server: this level provides access to the variable from all applications and databases on an Essbase server.

G

2. From the Actions menu, select Edit, and then Variables for "servername". The Substitution Variables dialog box is displayed. 3. Perform one of the following actions: • For a server-level variable, do not select anything from the application and database drop-down lists. • For an application-level variable, select an application from the application dropdown list, but do not select anything from the database drop-down list. • For a database-level variable, select an application and database from the dropdown lists. 4. In the Variable text box, enter a variable name.

Essbase 11.1.2 Bootcamp

e

bl a r fe

14-15

Lesson 14 Referencing Members in Calculations 5. In the Value text box, enter a variable value.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

6. Click Set. Using Substitution Variables in Calculations To reference substitution variables in calculation scripts, enter the substitution variable name prefaced with an ampersand (&) anywhere that you would use a regular member name. When you execute the calculation script, Essbase automatically substitutes the substitution variable value for the substitution variable and then performs the calculation. For example, you set up substitution variables called CurMonth and NextMonth for Bigcorp Sales. You use the variables to create a calculation for the Rolling Forecast scenario that copies actual data into time period members from Jan through the current month and that also copies forecast data into time period members from the next month through Dec, creating a moving forecast horizon. The following script shows the calculation:

s

an r t n

o

n a FIX (Jan:&CurMonth) as ฺ h DATACOPY "Current Year" TO "Rolling Forecast"; ) t e de ENDFIX i n ฺ u t as nt G c FIX (&NextMonth:Dec) om tude c DATACOPY Forecast TO "Rolling dt@ tForecast"; is S e ENDFIX h em use a r (g e to y r er cens n e li Tr e m rae

G

14-16

e

bl a r fe

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 14 Referencing Members in Calculations

Summary In this lesson, you should have learned to: • Reference members explicitly and dynamically

e

• Create calculation variables

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

14-17

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 14 Referencing Members in Calculations

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

14-18

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

L E S S O N

1 5

Developing and Testing Complex Calculation Scripts

15

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Describe the script development process • Load data to upper-level members

e

G

m rae

n a • Describe intelligent calculation behavior as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Implementing a Script Development Process

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li a Script Development Process Tr Implementing e m raeWhen you draft calculation scripts, avoid developing and testing them on your full Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

database. Because calculating in a multidimensional environment is a complex process, develop and test calculation scripts incrementally, writing line-by-line and implementing frequent test cycles. Developing and testing calculation scripts on full, real-world databases presents two fundamental problems: • Calculation test-cycle times are substantially increased when full databases are tested. Long calculation times inhibit incremental development and testing, which are necessary in the Essbase data structure, where calculation dependencies are complex and multidimensional impacts may not be immediately obvious. • Real-world data is often more difficult to audit than test data. As you develop scripts, you should focus on the technical accuracy of your calculation formulas; do not attempt to tie results to prescribed control totals. It is typically easier to trace calculations and dependencies with contrived test data than with real-world data.

15-2

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts The calculation script development process has two phases: 1. Prototype Phase: You develop scripts and test them for baseline accuracy.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

2. Pilot Phase: You test scripts for performance and capture of exception conditions.

TIP: After building your outline, you should separate the calculation script development process from the rules file development process to avoid cross-contamination of the data sets required for the processes.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

15-3

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Following a Calculation Test Cycle 1 CLEARBLOCK ALL; 2 Changed calculation script

e

Test cycle

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr a Calculation Following Test Cycle e m raeWhen testing calculation scripts for accuracy, you want to be sure that behind-the4

3

Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

scenes events cannot affect your test results. For example, data calculated twice with the same script can return two different results, returning a false negative or a false positive for one of your test calculations.

Disabling Intelligent Calculation To help ensure that Essbase calculates every possible result for your calculation script, you can turn off intelligent calculation. If Essbase marked a particular data block as calculated, intelligent calculation interferes with subsequent calculations. It is common practice to disable intelligent calculation with the SET UPDATECALC OFF command in the housekeeping section of a script. The full impact of intelligent calculation is discussed in more detail later in this lesson.

15-4

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Implementing Test Cycles Every time you change your script and need to test calculation results, follow these steps: 1. Clear all data from the database. 2. Load calculation test data. 3. Execute your calculation script. 4. Audit your calculation results. If you follow this formalized test cycle every time you test changes to a calculation script, you ensure the following outcomes:

s

an r t n

o

• Fastest performance possible, given that results must be based on input data and subsequent calculation

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

• Results that are based on your input data and the subsequent calculation, not on other factors

15-5

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Implementing a Prototype Phase 1. Create test input data. 2. Create audit spreadsheets. 3. Implement a draft and test cycle.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e i Tr Implementing al Prototype Phase e m raeDuring the prototype phase of calculation script development, you develop a basic script Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

that correctly calculates dependencies and values for baseline calculations. You want the prototype phase to be as fast and efficient as possible, with low calculation test cycle times. To meet this objective, Oracle recommends the following process for creating a prototype calculation script: 1. Create test input data. 2. Create audit spreadsheets. 3. Implement a draft and test cycle.

TIP: Be sure to check your block statistics before and after running your calculation.

15-6

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 15 Developing and Testing Complex Calculation Scripts Creating Test Input Data To quickly check your results, you should create test data that is simple, easy to load, and easy to audit. It is not efficient to create prototype calculation scripts when using full or even partial sets of actual data, because the results require too much time to calculate and audit. To create a simple data set for prototyping: 1. In Excel, create a spreadsheet that represents a focused set of accounts to be tested against a representative cross-section of sparse dimension members. Clearly label the spreadsheet as an input sheet.

e

Gr

bl a r TIP: In your input worksheets, use only members to which you load data. For fe ns example, if Qtr 1 is a calculated member, do not reference Qtr 1 intryour a input sheet. If your input levels vary, you can create multiple input onn a spreadsheets in one workbook. s a ) h deฺ t e ฺn Gui t s 2. Enter your test data into the blank input sheets. ca ent m co Stud @ t dmultiples isof 100 or 1000 or similar simple numbers TIP: For easier auditing, use e h t ea series of calculation dependencies. emto trace s for which it isreasy a u (g e to y r er cens n e 3. Submit Tr the testlidata to Essbase. e 4. In Administration Services Console, extract the test data from Essbase into a flat file aem (this step ensures that test data is in an easily readable format for Essbase, and does not require a rules file to reload).

5. Optional: Create a MaxL batch script to automate the process of loading the test file. Creating Audit Sheets When drafting and testing calculation scripts, you must be able to audit results easily. To accomplish this objective, set up clearly identified audit and comparison sheets, separate from input sheets, in your testing workbook. Audit sheets are designed to test whether specific calculations are working. Your audit sheets, when retrieved, must reflect member combinations that show both input data and calculation results. Do not audit too many types of calculations on one sheet; you should use several audit sheets, each of which tests a different calculation sequence, such as allocations versus back calculations.

Essbase 11.1.2 Bootcamp

15-7

Lesson 15 Developing and Testing Complex Calculation Scripts As a best practice, create three audit sections:

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• The section for Essbase calculation results includes data that you retrieve from Essbase. • The section for expected calculation results includes static data that is copied from a data source or that is calculated with Excel formulas. To protect Excel formulas during retrieval, enable formula preservation options. To protect numeric data during retrieval, place an equal sign ( = ) before the number to convert the number to an Excel formula. • The section for comparison of Essbase calculation results and expected calculation results includes Excel formulas that calculate the difference between Essbase results and static data. This section enables you to see quickly and easily where Essbase results vary from expected results.

e

bl a r fe

ns a r t You can implement these three sections on one audit worksheet or create an audit onworksheet for each section. n a s a ) h deฺ t Draft and Test Cycles e i prototype script by uyour tฺnand test After setting up input and audit worksheets, you a draft s G t a calculation script in its c andentesting using a cyclical test procedure. Rather thanm writing udof script and then complete the co oneSline t entirety, test small sections at a time:@ Write s and test again. In this way, you can dtanother iline calculation testing cycle; then write e h t elines as you write them. em script identify problematic or incorrect s a u r (g e to y r The following tips can r help sspeed the calculation test cycle: e n n e re your database, lic • To T clear create a separate calculation script with only the command e mCLEARBLOCK ALL. rae

G

NOTE: Do not use this method with larger data sets, as performance is better when data is cleared using Administration Services Console.

• Create a MaxL script to automate loading of your input data. • Before executing your prototype calculation script, refresh data on your audit sheets. With this data retrieval, you verify the input data that you loaded.

15-8

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Pilot Phase

e

bl a r fe

Optimize performance

s

an r t n

G

no a as ฺ h ) t e de exceptions i n ฺ Identify and correct u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Pilot Phase e m raeWhen you develop a prototype script, you confirm that calculations and dependencies Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

work correctly on test data. During the pilot phase of testing, you test the prototype script against real-world data and make necessary changes. You typically make two types of adjustments to the prototype script during pilot testing: • Performance optimization • Exception trapping Performance Optimization During prototype testing, the database is typically too small for you to accurately assess performance impacts. During the pilot phase, you refine your prototype script to address performance issues.

Essbase 11.1.2 Bootcamp

15-9

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

The following tips can help you optimize the performance of your calculation scripts: • Minimize the number of calculation passes in your script. Two calculation passes on a given set of data blocks require twice as much time as one pass, so use the pilot phase to ensure that all calculations that can be grouped are performed in a single pass. • For each calculation pass, minimize the number of blocks that Essbase calculates. If Essbase does not need to calculate every existing data block, use FIX statements to focus calculation on the necessary blocks. • Revise sparse and dense storage settings to reflect your final calculation requirements.

ns a r t • Determine whether your calculation returns correct results with intelligent on- calculation n a calculation. The full turned on, thus minimizing the number of data blocks required for s a ramifications of intelligent calculation are discussed later lesson. ฺ ) hin this t e e d i n u tฺ s G a t Exception Trapping c en om tud The prototype calculation script typicallycaddresses known mainstream or baseline Sagainst real data can result in errors t@prototype calculation requirements. Testing d your s i e h tand that require further refinement of the script. m baseline that represent exceptions toethe e s a u trapping: The following are examples gr oftexception o ( y rr nformulas se because actual data is input at levels other than the e • Adjusting allocation n e rethat werelicassumed during the prototype phase levels T e m e ra • Adding conditional logic to address the handling of zero values in calculations

G

• Adding DATACOPY commands to create data blocks necessary for calculation Pilot Phase Testing Testing in the pilot phase follows the testing-cycle steps of the prototype phase, but uses real data instead of test data. Using real data modifies the test-cycle methodology, as it was described for the prototype phase. Unlike test data, real data tends to reside in exterior data sources that are typically loaded with rules files. Also, the volume of real data tends to be significantly higher than the volume of test data, a difference that increases calculation times.

15-10

e

bl a r fe

• Revise dynamic calculation (versus batch calculation) approaches to reflect your final calculation requirements.

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Additionally, because one of the primary objectives of this phase is to improve calculation performance, you need to mimic your production environment as much as possible and follow your typical sequence of production operations. For example, upload data from G/L, make outline modifications, and then run your calculation. Although you should use Excel in this phase to audit calculation results, you can automate the rest of your calculation test cycle with a MaxL script. The following example clears the database, loads data files, and then runs a calculation script. The entire process is spooled to a log file, which shows database statistics before and after calculation. /****************************************************************/ /* This MaxL script clears and then loads data to the /* Bigcorp Sales database for testing calculation scripts. /* Variables: /* $1 = user name /* $2 = password /****************************************************************/

alter system load application 'Bigcorp'; alter application 'Bigcorp' load database 'Sales'; alter database 'Bigcorp'.'Sales' reset; /* ***************************************/ /* Load data files */ /* ***************************************/ import database 'Bigcorp'.'Sales' data from server text data_file 'Actual' using server rules_file 'Loadcorp' on error write to 'c:\temp\acterr.txt'; import database 'Bigcorp'.'Sales' data from server text data_file 'Forecast'

Essbase 11.1.2 Bootcamp

e

bl a r fe

s

an r t n

no a as ฺ h ) /* ****************************************/net de i ฺ u t /* CREATE PROCESS LOG AND LOGIN TO SERVER as*/ nt G c /* ****************************************/ om tude c dt@ this S spool on to 'c:\temp\output.txt'; e login $1 $2 on 'localhost'; em use a r (g e to y r r /* **********************************************************/ eand nsclear data from Bigcorp Sales database */ n e e /* Activate then c li Tr /* **********************************************************/ e m rae

G

*/ */ */ */ */

15-11

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

using server rules_file 'Loadcorp' on error write to 'c:\temp\forerr.txt'; /**********************************************/ /* Get pre-calculation database statistics*/ /**********************************************/ query database 'Bigcorp'.'Sales' get dbstats data_block; /*****************************/ /* Run calculation scripts*/ /*****************************/

e

execute calculation 'Bigcorp'.'Sales'.'CalcAll'; /***********************************************/ /* Get post-calculation database statistics*/ /***********************************************/

bl a r fe

s

an r t n

o

n a as ฺ h ) t e de query database 'Bigcorp'.'Sales' get dbstats data_block; i n ฺ u t as nt G c /* ********************************/ om tude c /* Close out process log and texit d @ th*/is S e /* ********************************/ em use a r (g e to spool off; y r er cens n e exit; Tr li e m rae

G

15-12

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Upper-Level Data Loads Three methods: • Do not aggregate missing values. • Load to leaf nodes. • Allocate data before consolidation.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Loads Tr Upper-Level Data e m raeUnlike aggregate storage models, block storage databases enable you to load data to Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

any level, not only level 0. However, if you load data to upper levels, you must implement certain calculation or design schemes. Such schemes protect the data when you consolidate. Essbase provides three methods of handling upper-level input data (listed from least preferred to most preferred): • Do not aggregate missing values (this protects upper-level inputs). • Load to special leaf nodes. • Allocate upper-level input data to level 0 before consolidating. (For a comprehensive discussion of allocating data, see “Allocating Data” in Lesson 16, “Normalizing Data.”)

Essbase 11.1.2 Bootcamp

15-13

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Aggregate Missing Values •

Aggregate Missing Values ON: – Overwrites upper-level data loads – Improves calculation performance – Is the recommended default setting



Aggregate Missing Values OFF:

e

– Protects upper-level data loads – Slows calculation performance – Is the default setting for new databases

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Values Tr Missing Aggregate e m raeThe fundamental problem with loading data to upper-level members is that the normal Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

consolidation process can overwrite the data. For example, in the Bigcorp Sales database, you load a value of 100 to Qtr 1 and no data to Jan, Feb, or Mar. However, when you calculate the Year Tot dimension, Essbase receives an instruction to calculate Qtr 1 as Jan+Feb+Mar, and the calculated sum overwrites your input value. Whether the calculation is performed depends on your settings. One way to handle upper-level data loads during the calculation process is to instruct Essbase not to aggregate missing values during hierarchy calculations. This instruction protects upper-level data that, in the hierarchy, has no data below it.

15-14

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Behavior of Aggregate Missing Values There are two ways to control how Essbase aggregates missing values: • Default database setting: New databases by default do not aggregate missing values. You can change the default setting on the General tab of the Database Properties dialog box. • Calculation script: You can use the command SET AGGMISSG ON|OFF to control the aggregation of missing values on a script-by-script basis. This command overrides the default database setting and is typically included in the housekeeping section of the script.

TIP: As a best practice, you should turn aggregate missing values on as a database default and turn it off selectively in your calculation scripts.

e

bl a r fe

s

an r t n

G

no a as ฺ Performance Implications h ) t e When you aggregate missing values during hierarchyn consolidations de (SET AGGMISSG i ฺ u t G following reasons: ON), calculation performance is significantly enhanced the as for t c n de om Celltuaggregations c • Dense calculations within a data block: that can be performed S @ t s multiple ways are summed only the following data grid, which shows i ed once.thConsider m intersections of the costeof salessaccounts and quarter 1 time periods: e ra to u g ( e Feb Mar Qtr 1 ry nsJan r e n e re lic 100 100 100 300 Labor T eMaterial m 50 50 50 150 e ra Overhead

75

75

75

225

Cost of Sales

225

225

225

675

Essbase can achieve the same result for the intersection of Cost of Sales and Qtr 1 by using the account formula (Labor+Material+Overhead) or the time period formula (Jan+Feb+Mar). Rather than calculating "Cost of Sales"->"Qtr 1" during the Accounts dimension calculation and then again during the Year Tot dimension calculation, Essbase calculates the cell only once, using the consolidation path of the dimension that it calculates last

Essbase 11.1.2 Bootcamp

15-15

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 15 Developing and Testing Complex Calculation Scripts • Sparse calculations between data blocks: Blocks that can be aggregated multiple ways are calculated only once, and use an algorithm that attempts to calculate by using the fewest possible blocks. Consider the following grid, which shows blocks numbered 1 through 12, representing the intersections between Thunderball products and OEM customers: O-Dell

O-HP

O-IBM

OEM

Thunderball 270 A

1

2

3

4

Thunderball 540 A

5

6

7

8

Thunderball

9

10

11

12

s

an r t n

no a as toฺ protect upperNot aggregating missing values (SET AGGMISSG OFF) is)required h t hierarchy e de consolidations can level data. However, not aggregating missing values ฺduring i n u t G two situations: seriously affect calculation performance, especially asin thentfollowing c m ude oblocks c • You have a low ratio of calculated data t to input data blocks. S @ t s eatdparenttlevels hi on sparse dimensions; for example, in • You load many data values m e ae oyou usload many data values into Retail in a sparse the Bigcorp Sales g database, r ( t Customer dimension. ry nse r e ceperformance overhead required for not aggregating missing ren lithe In these situations, T e is 10% to 30%. If calculation performance is critical, reconsider how you configure values m e a

Gr

the database or how you load data, to avoid the need to protect upper-level input data.

NOTE: When data is loaded to a mix of different levels (for example, Cost of Sales loaded to Family Total, but units and prices loaded to level 0 products), the default dimension consolidation order can produce incorrect results. Be sure to thoroughly test calculation results at all levels if you use this method.

15-16

e

bl a r fe

Data block 12 (the intersection of Thunderball and OEM) can be calculated as the sum of blocks 4+8 or the sum of blocks 9+10+11. Rather than using both formulas and thus calculating block 12 twice, Essbase uses only the 4+8 formula because it requires fewer blocks.

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Leaf-Node Loading • •

Avoids upper-level input issues Requires additional members in the outline

e

Level 0 placeholder for Family Total input data

bl a r fe

s

an r t n

G

no a as ฺ h ) t 0 placeholder e for Level e dinput i n ฺ Channel Total data u t s G a t c n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr Loading Leaf-Node e m raeAnother method for handling upper-level input values is to avoid loading data to upper Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

levels. The leaf-node loading method involves the following steps:

1. Create a level 0 member (leaf node) as a child of the upper-level member to which you want to load data. 2. Load upper-level inputs to the leaf nodes instead of to the upper-level members. 3. Consolidate as usual. When you use this method, you are not required to protect upper-level data. You can aggregate missing values, which improves performance. Because all input is level 0, you are not required to correct totals at upper levels, as you are with multilevel inputs. On the slide, the first example shows the Product dimension for Bigcorp Sales, with the member “No Product” added as a child of Family Total. You can use “No Product” to load input data to Family Total, as it aggregates directly to its parent. The second example shows a similar solution in the Customer dimension: a child of Channel Total called “No Customer.” Essbase 11.1.2 Bootcamp

15-17

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Intelligent Calculation Only marked data blocks are recalculated.



e

bl a r fe

s







an r t n

G

no a as ฺ h ) t e de i n ฺ         u t s G a t c n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr Calculation Intelligent e m raeA primary goal in calculation script development is optimization (elimination of extra Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

passes through the database index). To optimize calculation, you can use FIX and IF statements to focus calculations, or you can use an option called intelligent calculation. When you perform a full database calculation, Essbase marks which blocks were calculated. If you then load a subset of data, you can calculate only the changed data blocks and their ancestors. This selective calculation process is intelligent calculation. By default, intelligent calculation is turned on. You can change the default setting in the essbase.cfg file or on a script-by-script basis with the SET UPDATECALC OFF command. For information about the essbase.cfg file, see the Oracle Essbase Technical Reference, “Essbase.CFG Configuration Settings.”

15-18

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts Intelligent calculation is based on data-block marking. When intelligent calculation is active, during normal processes, within the index file, blocks are marked clean or dirty.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• Clean blocks: Blocks that do not require calculation. • Dirty blocks: Blocks that require calculation. When intelligent calculation is active, Essbase looks for only dirty data blocks during calculation.

NOTE: Intelligent calculation marks data blocks, not data cells, clean or dirty. For example, assume that, in a database that includes a dense time dimension, data is loaded once a month. When you load data to a month, intelligent calculation marks the affected blocks as dirty. Therefore, all time periods within the affected blocks are recalculated.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

15-19

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Block Marking: Clean Blocks • • •

Automatic intelligent calculation Forced intelligent calculation Forced data block marking 

e

bl a r fe

s

an r t n

G

 no a as ฺ h ) t e de i n ฺ u t s      ca  nt G    e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr Marking: Data Block Clean Blocks e m raeThe basis for understanding intelligent calculation is understanding under what 



Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

conditions blocks are marked clean and dirty. If any of the following conditions are true, intelligent calculation marks blocks as clean: • The script includes CALC ALL or CALC DIM on all dimensions. • The script includes SET CLEARUPDATESTATUS AFTER, a command that applies intelligent calculation to the calculation process. • The script includes CLEARUPDATESTATUS ONLY, a command that directs intelligent calculation to mark blocks without performing a database calculation.

15-20

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Automatic Intelligent Calculation When you execute a calculation script with a CALC ALL statement or with a CALC DIM statement that includes all dimensions, the intelligent calculation process performs the following actions: • Calculates and marks clean all previously existing input data blocks. • Calculates and marks clean all data blocks created by the consolidation process. • Calculates and marks clean all previously existing dirty blocks. The following script examples enngage intelligent calculation for Bigcorp Sales: CALC ALL;

e

Gr

bl a r CALC DIM ("Accounts", "Year Tot", "Scenario", "Product", "Customer"); fe s n tra Even when intelligent calculation is enabled, Essbase does not use an intelligent n calculation process for CALC DIM statements that do not include all dimensions. Rather, no a Essbase calculates all relevant data blocks, regardless of clean status, and all asor dirty h ฺ ) data blocks retain their status, dirty or clean. t e de i n ฺ u t G The following script examples do not engage intelligent as ncalculation: t c de "Product"); om"Scenario", u c CALC DIM ("Accounts", "Year Tot", t dt@ this S e CALC DIM ("Accounts", eTot"); em"Year s a u r AGG ("Scenario", (g "Product", to "Customer") y e r er cens n e r ForcedTIntelligent liCalculation e The SET CLEARUPDATESTATUS AFTER calculation command engages intelligent aem calculation for any calculation script, regardless of construction. Typically, you use this command when you cannot meet the conditions for a CALC DIM on all dimensions.

When you execute a calculation script that includes the SET CLEARUPDATESTATUS AFTER command, data blocks that are marked clean are not calculated, and data blocks that are marked dirty are calculated and marked clean.

Essbase 11.1.2 Bootcamp

15-21

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

In following example, the SET CLEARUPDATESTATUS AFTER command ensures that the data blocks calulated by the script are marked clean: SET CLEARUPDATESTATUS AFTER; FIX (@IDESCENDANTS("Qtr 1")) CALC DIM (Accounts); ENDFIX Forced Block Marking Without Calculating The SET CLEARUPDATESTATUS ONLY calculation script command instructs Essbase to perform data-block marking, but not to perform script calculations. Typically, you use this command immediately after a script segment in which intelligent calculation is disabled.

ns a r t • The first segment, in which intelligent calculation is disabled, calculates on-data blocks n correctly but does not mark dirty blocks as clean. a s a h ฺ SET • In the second segment, in which data-block marking ist)enabled,ethe e d i n u to mark as clean all CLEARUPDATESTATUS ONLY command instructs tฺ Essbase s G a t c blocks that were previously marked dirty. n e m d o c S*/tu /* Turn off intelligent calculation @ t d this SET UPDATECALC OFF; me e use a r (g e*/to /* Back Calculation y r er c%"en=s"Gross Margin" / "Net Sales"; "Gross n Margin e "List Tr Price"li= "Gross Sales" / Units; e aem

Gr

The following example is a two-part script:

/* Enable data block marking */ SET CLEARUPDATESTATUS ONLY;

"Gross Margin %" = "Gross Margin" / "Net Sales"; "List Price" = "Gross Sales" / Units; SET CLEARUPDATESTATUS ONLY affects only the database index and does not require the referenced data blocks to be moved into memory. Under most circumstances, therefore, elements of a calculation script following SET CLEARUPDATESTATUS ONLY execute very quickly.

15-22

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Block Marking: Dirty Blocks • • • •

Block creation during data input Data modification Creation or modification of descendant blocks Database restructure

e



bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t s G      ca  nt    e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr Marking: Data Block Dirty Blocks e m raeIf any of the following conditions is true, intelligent calculation marks blocks as dirty, 



Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

thereby making the blocks eligible for calculation the next time intelligent calculation is engaged: • Block creation during data input • Data modification • Creation or modification of descendant blocks • Database restructure Block Creation During Data Input Blocks created from a data input process are marked dirty as they are created. Blocks can be created during batch data load processes, by submitting data from Smart View, or by using other direct input options.

Essbase 11.1.2 Bootcamp

15-23

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Data Modification Blocks that include modified data cells are marked dirty. For example, if, within a block, a line manager updates units, the block should be marked dirty because revenues, costs, and margin are now incorrect and need recalculating. Creation or Modification of Descendant Blocks Intelligent calculation is efficient because it calculates only affected blocks. The ancestors of a dirty block need to be calculated because they depend on values of the modified descendant. Therefore, all ancestors of input and modified blocks are marked dirty.

s

an r t n

no a as ฺ h ) t causes e • Moving, adding, or deleting members of sparse dimensions de only the affected i n ฺ u t blocks and their ancestors to be marked dirty. as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr e aem • Moving, adding, or deleting members of dense dimensions causes all blocks to be marked dirty.

Gr

15-24

e

bl a r fe

Database Restructure Outline changes prompt Essbase to mark blocks dirty. Which blocks are marked dirty is determined by whether the outline changes involve dense or sparse dimensions:

Essbase 11.1.2 Bootcamp

Lesson 15 Developing and Testing Complex Calculation Scripts

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Usage Considerations Maintain clean and dirty status of blocks: • False negatives affect calculation efficiency • False positives affect data integrity 

e

bl a r fe

False positive

s

an r t n

G

o n a as ฺ h ) t e de i n ฺ u t as  nt G c        om tude c dt@ this S e em use a r (g e to y r er cens n e r li TConsiderations Usage e m raeOccasionally, clean data blocks are marked dirty. In such cases, calculation efficiency 



Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

suffers. A more serious problem, however, is a false positive condition, in which dirty blocks are marked clean. In the case of such false positives, data integrity can suffer. False Positives False positive conditions can arise in various ways:

• Calculating only a subset of a block. Essbase marks at the block level, not the cell level, so a calculation that is executed on a subset of cells can cause a false positive condition. Only a few cells are calculated, but the block is marked clean, although uncalculated cells remain.

Essbase 11.1.2 Bootcamp

15-25

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 15 Developing and Testing Complex Calculation Scripts • Calculating a back calculation after calculating all dimensions. A false positive can prevent the required second calculation pass, which corrects upper-level rates and percentages. The false positive condition occurs if the CALC DIM portion of a script engages intelligent calculation, which marks all blocks clean during the CALC DIM process. When Essbase processes the back calculation portion of the script, no data blocks are calculated because all blocks are marked clean. • Using a FIX statement. Ancestors of a dirty block are not marked dirty until the descendant dirty block is calculated. A false positive can result if the descendant dirty block is calculated within a FIX statement that does not include the dirty ancestor block. After calculation, Essbase marks the descendant block clean, and the ancestor block remains marked clean, although it should be marked dirty.

s

an r t n

no a as ฺ h ) t e de i n ฺ u t Usage Guidelines G cas entbenefits Intelligent calculation can provide significantm performance in certain situations, d o u c t but requires vigilant maintenance of @ the clean and S dirty status of data blocks to avoid t s d i skipping the wrong blocks on calculation. e thBe very careful when using intelligent m e e calculation, and be sure to review the detailed discussion of intelligent calculation in the a o us r g Oracle Essbase Database Guide. t y ( sAdministrator’s e r r necalculation en function is most productively used in interactive or iterative The intelligent e c i r l T in which small, incremental changes are made to a database and in which it is situations e m raenot necessary to recalculate the entire database. For example, you can use intelligent

G

calculation in the following situations.

• During the month-end close periods, allocation rates and adjusting entries may be updated multiple times. You use intelligent calculation to view update results without recalculating the entire database. • In budget or forecasting applications, typically, many users update units and drivers on a regular basis. In such applications, for users to analyze the impact of their updates, a short calculation time is imperative.

15-26

e

bl a r fe

• Following SET CLEARUPDATESTATUS ONLY with unrelated calculations. You should follow SET CLEARUPDATESTATUS ONLY with a repetition of the section of the script for which you want to force data block marking. A false positive can occur if SET CLEARUPDATESTATUS ONLY touches blocks that are otherwise dirty and that are not correctly calculated.

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 15 Developing and Testing Complex Calculation Scripts

Summary In this lesson, you should have learned to: • Describe the script development process

e

• Load data to upper-level members

s

• Describe intelligent calculation behavior

e

m rae

bl a r fe

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

15-27

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 15 Developing and Testing Complex Calculation Scripts

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

15-28

Essbase 11.1.2 Bootcamp

L E S S O N

1 6

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Normalizing Data

16

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Allocate data with calculation scripts • Plan data normalization

e

G

m rae

n a • Normalize rates and drivers as ฺ h ) t • Copy and clear data e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Allocating Data Upper-level input allocation: 1

e

100%

bl a r fe

s

an r t n

G

no a 3 as ฺ h ) t e de i n ฺ u t as nt G c om tude15% 45% 40% 15% 40% c 45% dt@ this S e em use a r (g e to y r er cens n e li Tr Data Allocating e m raeAs mentioned in the topic “Upper-Level Data Loads” on page 15-13, a method for 2

Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

handling upper-level input data is to allocate the data that you load to dependent level 0 data blocks, so that you can consolidate normally. However, allocations are not restricted to distributing upper-level input data. You can use the methods described here to distribute totals loaded to level 0 data blocks across other level 0 data blocks. When you allocate data, you typically include the following steps in your calculation process: 1. Load input data to upper-level data blocks or designated level 0 data blocks. 2. Allocate data to dependent level 0 data blocks, using various allocation methods. 3. Consolidate data using a CALC ALL or CALC DIM statement (For upper-level input data, the statement overwrites the original input).

TIP: If allocating a level 0 input, offset the original input amount by the sum of all allocated data, to avoid doubling the input data upon consolidation.

16-2

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Calculating Fixed Rate Allocations VAR VAR VAR VAR

FinanceAlloc = .15 SalesAlloc = .45 HRAlloc = .10 MktgAlloc = .30

e

bl a r fe

s

an r t n

G

no a s 15% 45% 10% 30% ha ฺ ) t e e d i n u tฺ s G a t c n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Rate Allocations Tr Fixed Calculating e m raeSome allocations are based on fixed percentages; for example, expenses loaded to a Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

Corp HQ entity that are allocated to multiple departments based on a fixed percentage for each department. Calculate fixed rate allocations with the following member formula: Allocation destination account = location of input total * location of fixed rate; In these cases, load the percentage to a single location in the database and base your allocation on this fixed point of reference, as in the following example. /* Information Assumptions: 1) Expenses are loaded to generic expense accounts, and then allocated to department-specific accounts based on fixed percentages. 2) Allocation percentages are loaded to the Corp HQ entity in the FinancePct, SalesPct, HRPct, and MktgPct accounts, respectively. */

Essbase 11.1.2 Bootcamp

16-3

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 16 Normalizing Data

/* Allocate IT Expense */ "IT Exp Finance" = "IT Exp" * "Corp HQ"->"FinancePct"; "IT Exp Sales" = "IT Exp" * "Corp HQ"->"SalesPct"; "IT Exp HR" = "IT Exp" * "Corp HQ"->"HRPct"; "IT Exp Mktg" = "IT Exp" * "Corp HQ"->"MktgPct"; /* Allocate Administrative Expense */ "Admin Exp Finance" = "Admin Exp" * "Corp HQ"->"FinancePct"; "Admin Exp Sales" = "Admin Exp" * "Corp HQ"->"SalesPct"; "Admin Exp HR" = "Admin Exp" * "Corp HQ"->"HRPct"; "Admin Exp Mktg" = "Admin Exp" * "Corp HQ"->"MktgPct”; Alternatively, you can define temporary variables in your calculation script to store percentages temporarily, as in the following example.

e

bl a r fe

s

an r t n

/* Information Assumptions: Expenses are loaded to generic expense accounts and then allocated to department-specific accounts based on fixed percentages. */

Gr

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude /* Housekeeping */ c /* Define fixed allocation percentages dt@ this Sfor each department */ e VAR FinanceAlloc = .15; em use a r VAR SalesAlloc = .45; y (g se to VAR HRAlloc =rr.10; VAR MktgAlloc ne =li.30; en e c r T e ae/*mAllocate IT Expense */ "IT "IT "IT "IT

Exp Exp Exp Exp

Finance" = "IT Exp" * FinanceAlloc; Sales" = "IT Exp" * SalesAlloc; HR" = "IT Exp" * HRAlloc; Mktg" = "IT Exp" * MktgAlloc;

/* Allocate Administrative Expense */ "Admin Exp Finance" = "Admin Exp" * FinanceAlloc; "Admin Exp Sales" = "Admin Exp" * SalesAlloc; "Admin Exp HR" = "Admin Exp" * HRAlloc; "Admin Exp Mktg" = "Admin Exp" * MktgAlloc;

16-4

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Calculating Dynamic Ratio Allocations

Customer

e

O-Dell

O-IBM

s

an r t n

O-Acer

bl a r fe

G

no a as ฺ h ) "O-IBM"->"Units" / "O-Dell"->"Units" / t "O-Acer"->"Units" / e e d i n "Customer"->"Units" "Customer"->"Units" "Customer"->"Units" ฺ u ast nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Dynamic Calculating Ratio Allocations e m raeIn dynamic ratio allocations, the allocation ratio is calculated based on other data Allocation ratios:

Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

available in the database, such as percent of total headcount, percent of total units, or percent of total sales. This approach obliges you to include a calculation of the appropriate ratio in addition to your allocation instructions, as in the following formula: Allocation destination account = location of input total * (value of ratio base in current data block / total value of ratio base);

The example on the slide shows a simple two-level Customer hierarchy. To calculate a ratio of individual customer units to the total consolidated units, you must divide the units in each child block (O-IBM, O-Dell, and O-Acer) by the units in the parent block (Customer).

TIP: You may have to calculate the total ratio base before calculating the allocation. For example, if your allocation is based on a percent of total headcount, you must calculate total headcount before you allocate. Essbase 11.1.2 Bootcamp

16-5

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Planning Data Normalization

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e Tr Datali Normalization Planning e m raeIn interactive applications, allocations are sometimes stand-alone processes. However, Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

when allocations are incorporated into a database consolidation, they typically fall into the normalization section of the calculation script architecture.

In relational databases, the process of normalization eliminates redundant data from tables to improve performance and data scalability. Because Essbase does not store data for block storage databases in tables, block storage normalization is a very different process.

16-6

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

In block storage databases, normalization is required when you load data to data blocks other than the blocks that are the intended, final target for the data, as described in the following examples: • You load total miscellaneous expenses to a block that represents the total of all customers and all products. Prior to consolidating the database, you allocate total miscellaneous expenses to each individual, product-customer block (level 0) based on the percentage of total units sold in each level 0 block. • You load total IT expenses to a level 0 block for a corporate headquarters entity. Prior to consolidating the database, you allocate total IT expenses to each office location (level 0) based on the percentage of total headcount for each office.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

The common thread in the examples is that the calculations are required to happen prior to consolidation of the database. Normalization is a general umbrella term for any data manipulation that needs to occur after data input and before main database consolidation.

16-7

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Partitioning Calculations by Scenario One accounts model, multiple calculation requirements: • Actual data: – Input dollars and units. – Derive rates.



Budget data:

e

– Input units and rates. – Derive dollars .



bl a r fe

s

an r t n

Forecast data:

G

o n a – Input units and rates. as ฺ h ) – Derive dollars . t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculations Partitioning by Scenario e m raeFor most block storage databases, within the accounts dimension, scenarios are the Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

primary driver of modeling and calculation requirements. Data from scenario to scenario typically differs with respect to the form of input. Because you have only one outline model for the accounts dimension, you may need to calculate data differently from one scenario to the next: • Inputs for budget and forecast data are typically units, rates, and other drivers, and many dollar amounts are derived though calculation. • Budget data often contains much product detail (for example, standard cost by product) and overhead detail (for example, salaries by employee) but little customer detail (for example, only top ten customers budgeted). • Inputs for forecast data are similar to inputs for budget data, but the level of detail is different, depending on what kind of forecasting you need. For example, in a sales forecasting application, forecast data can have very detailed customer information.

16-8

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• Inputs for actual data are typically dollars and units, and rates are derived through calculation. In contrast to budget data, actual data often contains more revenue detail by customer and less overhead detail. Because of the type and level of inputs for each scenario, different scenarios often require different data load procedures and different calculation scripts.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

16-9

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Developing Normalization Tables 1. Determine how many dimensions require normalization. 2. Create a normalization template. 3. Complete the table based on input data.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Normalization Developing Tables e m raeBefore creating calculation scripts, you should document the data input and calculation Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

requirements for each scenario with a normalization table. The table helps you keep track of the assumptions that you make about the input data and provides a clear roadmap for building normalization calculations into your scripts. Normalization table development has the following steps: 1. Analyze data for a scenario to determine how many dimensions require normalization.

2. In a spreadsheet program, create a normalization table for the scenario, including sections for each dimension that requires normalization. 3. Complete the table, based on assumptions about input data.

16-10

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 16 Normalizing Data Determining What Dimensions Require Normalization Before building a normalization table, determine how many dimensions require normalization in each scenario. To accomplish this task, examine your input data. For example, in the Bigcorp Sales database, a value of 73,000 is loaded to the intersection “Budget”->"Material Variances"->Jan->"Family Total"->"Channel Total". Examine the full cell address, one dimension at a time, to determine whether data must move along the dimension, as follows: • Budget: No movement required (all 73,000 belongs in the budget scenario). • Material Variances: No movement required (all 73,000 belongs in the Material Variances account).

e

bl a r fe

• Jan: No movement required (all 73,000 belongs in the Jan time period).

s

an r t n

• Family Total: Movement required (a percentage of the 73,000 must be allocated to each product).

no a as ฺ h ) t e ide in two n ฺ u t Based on this analysis, Bigcorp Sales budget datasrequires normalization G a t c n dimensions: Product and Customer. om tude c t@ is S Creating Normalization Tablesed th m e e Normalization tables arera simply documentation templates that you create in a us g o ( t spreadsheet program. eare not connected to an Essbase database, so they do not ry They r s e n require Smart View. ren lice T e A normalization table lists all input accounts in the row axis. For each dimension that you m e a normalize, include the four columns described in the following table: • Channel Total: Movement required (a percentage of the 73,000 must be allocated to each customer).

Gr

Column Name

Description

Data Type

How data for the current account is created (direct input, formula calculation, consolidation, and so on)

Input Level

Generation or level at which data is loaded (for the dimension being normalized)

Push to Level

Generation or level to which input data must be moved (for the dimension being normalized)

Methodology

How to move data in the dimension being normalized (Common methods include copying data and allocating data.)

Essbase 11.1.2 Bootcamp

16-11

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Completing Normalization Tables After creating the template, enter the relevant information in the table, documenting as much as possible. The example on the slide shows a completed normalization table.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

16-12

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Developing Block Diagrams Upper-level input block

e

bl a r fe

s

an r t n

G

no a Level 0 target block as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Diagrams Tr Block Developing e m raeAnother way to visualize the normalization process is to create a diagram of data blocks Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

to see the movement required from the input data and the relationships between input blocks and normalization targets.

NOTE: In databases with a large number of sparse dimensions, creating a complete block diagram can be too complicated and should not be used as a development technique.

A block diagram is a two-dimensional representation of data blocks, where rows represent generations of dimension1 and columns represent generations of dimension2. The resulting matrix represents all combinations between the generations of dimension1 and dimension 2.

Essbase 11.1.2 Bootcamp

16-13

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

In the example on the slide, generations of the Customer dimension are represented in the rows, and generations of the Product dimension are represented in the columns. The intersections of customer and product represent all the possible level combinations between the two dimensions. Although normalizations can have interim steps, the final destination, or target block, for normalized data is a level 0 block. To build a block diagram, start with a single target block in the lower-left corner. This block is an arbitrary selection to enable creation of a representative slice of your database. In the example on the slide, the target block is the intersection of O-IBM and Lightbolt 365 A, a level 0 customer and a level 0 product. After creating your diagram, analyze your input data and then, on the diagram, mark the blocks to which data is loaded. Marking helps you visualize the movement of data required during normalization.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

16-14

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Normalizing Rates and Drivers

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Normalizing Rates and Drivers e m raeRates and other drivers, unlike total dollar amounts, do not require distribution based on Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

an allocation. Instead, you use member formulas to copy these drivers from their input location to their final destination. The block diagram on the slide shows the input locations for budget drivers in Bigcorp Sales; all of the drivers require normalization to the target (level 0) block.

You can use explicit or dynamic references in your formula. Which type of reference you choose depends on the nature of your input data. • Single member input: When you load rates to one fixed member in the dimension being normalized, normalize using explicit references. In the example on the slide, the discount percentage for each customer is loaded to the total for all products. To calculate Discount % in the target blocks, use the following formula: "Discount %" = "Discount %"->"Family Total";

Essbase 11.1.2 Bootcamp

16-15

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 16 Normalizing Data • Multiple member input: When you load rates to multiple members in the dimension being normalized, normalize using dynamic references. In the example on the slide, the list price for each product is loaded to customer channels; there are different prices for OEM, Retail, and Distributor customers. To calculate List Price in the target blocks, use the following formula: "List Price" = @PARENTVAL("Customer", "List Price");

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

16-16

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Copying and Clearing Data • • •

DATACOPY CLEARDATA CLEARBLOCK

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e i Tr and lClearing Copying Data e m raeAs part of your normalization process, you may be required to copy or clear data sets. Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

You can place copy and clear commands in the housekeeping section or the normalization section of your calculation script. The following table describes the available data manipulation commands: Command

Description

DATACOPY mbrName1 TO mbrName2

For copying data sets from one member to another

CLEARBLOCK ALL | UPPER | NONINPUT | DYNAMIC

For clearing previous input or upper-level data or stored dynamic calculations

CLEARDATA mbrName

For clearing specific members or member combinations

Essbase 11.1.2 Bootcamp

16-17

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Copying Data Copy entire blocks DATACOPY "Current Year" TO "Forecast"

Curr ent Year O-IBM Lightbolt 365 A

Forecast O-IBM Lightbolt 365 A

e

s

an r t n

Copy slices of blocks

bl a r fe

G

no a as ฺ h ) t e de i n ฺ u t G as Year t Current For ecast c n e m O-IBM d O-IBM o u c t Lightbolt 365 A S 365 A dt@ thisLightbolt e em use a r (g e to y r er cens n e Tr Data li Copying e m raeIn budgeting or forecasting scenarios, it is common to copy actual data to use as a basis DATACOPY "Current Year"->Feb TO "Forecast"->Feb

Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

for the budget or forecast. The DATACOPY command is an efficient way to copy large slices of the database, creating blocks or filling in data cells within blocks, depending on the focus of the calculation.

16-18

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Guidelines for DATACOPY: • You can use the cross-dimensional operator in the DATACOPY command, but the destination member combination cannot be more specific than the source member combination. For example, the following formula results in an error at runtime: DATACOPY "Current Year" TO "Prior Year"->"Jan"; However, the source member combination can be more specific than the destination member combination. For the following formula, Essbase fills in the missing member at runtime: DATACOPY "Current Year"->"Jan" TO "Prior Year";

s

DATACOPY ""Current Year"->"Jan" TO "Prior Year"->"Jan";

an r t n

no a • If the source and destination member combinations are all dense s member a h references, Essbase does not create data blocks. Fortexample, ฺ following ) dethe e i n calculation is executed only in existing data blocks: u tฺ s G a t c n DATACOPY "Jan" TO "Feb"; e m d o c Stu @ t s However, if any member of the for the source or destination is dmember icombinations e h t m sparse, Essbase creates data blocks, if they do not exist. e ae o us r g t • You can use DATACOPY inside FIX statements, but not inside IF y ( se commands r r e n statements. ren lice T e m e a

Gr

Essbase 11.1.2 Bootcamp

e

bl a r fe

When Essbase executes the preceding formula at runtime, it calculates the following combination of members:

16-19

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Clearing Data with CLEARDATA • •

Resets cells to #MISSING Removes entire blocks only when all members are sparse

e

bl a r fe

s

an r t n

G

no a FIX(@Children("Qtr 1") as ฺ h ) t CLEARDATA "Current Year"; e de i n ฺ u t ENDFIX as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li CLEARDATA Tr Data with Clearing e m raeIf you need to clear data values before loading values to your database, use Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

CLEARDATA. This command clears a specifically defined section of database cells, replacing the cell values with #MISSING. Guidelines for CLEARDATA: • You can use CLEARDATA inside a FIX statement to focus the scope of the command. The following example clears Current Year data from the children of Qtr 1: FIX (@CHILDREN("Qtr 1")) CLEARDATA "Current Year"; ENDFIX

16-20

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• You can use a cross-dimensional operator to create valid member combinations in a CLEARDATA statement. For example, the following statement clears Budget data for only the O-IBM customer. CLEARDATA "Budget"->"O-IBM"; • The CLEARDATA command removes data blocks only when all members referenced in the statement are sparse. If any member is dense, the command clears only data cells. For example, in Bigcorp Sales, the following command removes all Current Year data blocks for R-Gateway, because both Scenario and Customer are sparse dimensions. CLEARDATA "Current Year"->"R-Gateway";

e

bl a r fe

However, when you add a dense dimension, like Year Tot, to the member combination, as in the following example, the command clears cells in the Current Year data blocks for R-Gateway, but it does not remove the blocks.

s

an r t n

o

n a CLEARDATA "Current Year"->"R-Gateway"->"Jan"; as ฺ h ) • You cannot use CLEARDATA in an IF statement. et de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr e aem

Gr

Essbase 11.1.2 Bootcamp

16-21

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Clearing Data with CLEARBLOCK • •

Removes entire blocks Can clear cells without removing blocks

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li CLEARBLOCK Tr Data with Clearing e m raeRather than focusing on specific members or member combinations, the CLEARBLOCK Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

command clears data based on the type of block that you specify. You can choose one of the options described in the following table for this command: Option

Description

ALL

Clears all data blocks

UPPER

Clears all upper-level blocks

NONINPUT

Clears blocks that are completely created by a calculation operation and does not affect blocks into which some values were loaded through a data load operation

DYNAMIC

Clears blocks that contain values derived from Dynamic Calc and Store member calculations, resetting Dynamic Calc and Store members for recalculation

16-22

Essbase 11.1.2 Bootcamp

Lesson 16 Normalizing Data

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Guidelines for CLEARBLOCK: • If you use CLEARBLOCK inside a FIX statement on dense dimension members, Essbase clears only the data cells within the fixed range and does not remove data blocks. In the following example, the CLEARBLOCK command clears data only for January cells in the Current Year scenario: FIX("Jan", "Current Year") CLEARBLOCK ALL; ENDFIX • You cannot use CLEARBLOCK in an IF statement.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

16-23

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 16 Normalizing Data

Summary In this lesson, you should have learned to: • Allocate data with calculation scripts

e

• Plan data normalization

s

• Normalize rates and drivers

e

m rae

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr • Copy and clear data

bl a r fe

G

16-24

Essbase 11.1.2 Bootcamp

L E S S O N

1 7

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Attribute Dimensions

17

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Describe attribute dimensions • Add attribute dimensions to outlines

e

G

m rae

n a • Compare attribute dimensions to other design options as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Attribute Dimensions Overview Lightbolt

Lightbolt 365 A Drive Type: Internal, Drive Size: 150 Lightbolt 365 S Drive Type: Internal, Drive Size: 120

e

bl a r fe

Lightbolt 540 A Drive Type: External, Drive Size: 150

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Dimensions Attribute Overview e m raeAttribute dimensions extend the analysis capabilities of Essbase by providing a drillable, Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

hierarchy-style view of the characteristics of a standard dimension.

For example, Bigcorp can analyze product profitability based on product attributes such as hard drive size, incorporating into the analysis customer attributes such as region or account manager. Analysts can determine that hard drives with larger disk sizes (greater than 600 GB) sold to customers in the east are less profitable than anticipated. For greater detail, they can filter the analysis by specific attribute criteria, including the minimum sales, maximum sales, and profits of various products within a region. Essbase offers a specialized type of attribute dimension, called a varying attribute dimension. Varying attributes enable you to store changing attribute values in relation to other dimensions. For a comprehensive description of varying attribute dimensions, see Lesson, 18, “Analyzing Varying Attributes.”

17-2

Essbase 11.1.2 Bootcamp

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Attribute Dimension Benefits

Attribute dim ensions

Attribute crosstab report

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Dimension Attribute Benefits e m raeThe following are a few ways that analysis by attribute provides depth and perspective Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

for block storage databases, supporting better-informed decisions:

• You can select, aggregate, and report on data based on common attributes. • By defining attributes as having a text, numeric, Boolean, or date type, you can filter data using type-related functions such as AND, OR, and NOT operators and , and = comparisons. • You can use the numeric attribute type to group statistical values by attribute ranges; for example, population groupings such as 500,000–1,000,000. • Through the Attribute Calculations dimension, which is automatically created by Essbase, you can view sums, counts, minimum or maximum values, and average values of attribute data.

Essbase 11.1.2 Bootcamp

17-3

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• You can perform calculations using numeric attribute values in calculation scripts and member formulas.

TIP: Although you can create multilevel attribute hierarchies, they can seriously affect database and retrieval performance and should be avoided.

• You can create crosstabs of attribute data for a dimension, and you can pivot and drill down for detail data in spreadsheets. An attribute crosstab is a report or spreadsheet showing data consolidations across attributes of the same dimension. For example, the crosstab report on the slide displays product drive sizes as rows and drive types as columns. At the intersections, you see the net sales for the combinations of drive size and drive type. From this information, you can see which size-type combinations were most profitable in January.

s

an r t n

no a as ฺ h ) t e desee “Working with i n ฺ u NOTE: For a comprehensive discussion of attribute dimensions, t G as Administrator’s t c Attributes” in the Oracle Essbase Database Guide. n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr e aem

Gr

17-4

e

bl a r fe

Essbase 11.1.2 Bootcamp

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Attribute Calculations Dimension • • • •

System-defined Label only Dynamic Calc Not displayed in Outline Editor

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Calculations Attribute Dimension e m raeWhen you create the first attribute dimension in the outline, Essbase creates the Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

Attribute Calculations dimension, which includes five members with the default names Sum, Count, Min (minimum), Max (maximum), and Avg (average). You can use the members in spreadsheets or reports to dynamically calculate and report on attribute data, such as the average yearly sales of internal hard drives to OEM customers. The Attribute Calculations dimension is not visible in the outline. However in certain Oracle reporting tools that are customized to work with Essbase, it is available wherever you select dimension members, such as in the Member Selection dialog box in Financial Reporting or in Web Analysis. The Attribute Calculations dimension has the following properties: • System-defined. Essbase creates the Attribute Calculations dimension and its five members automatically. You cannot add or delete members.

Essbase 11.1.2 Bootcamp

17-5

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

• Label only. Like all label-only dimensions, the Attribute Calculations dimension shares the value of its first child, Sum. When you view an attribute member in a report, you are effectively viewing the Sum calculations, whether or not the Sum member is displayed. • Dynamic Calc. The data in the Attribute Calculations dimension is calculated when a user requests it, and then it is discarded. You cannot store calculated attribute data in a database. • Not displayed in Outline Editor. The Attribute Calculations dimension is not displayed in Outline Editor. Members from this dimension can be viewed in spreadsheets and reports and managed on the Properties tab in Outline Editor.

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

17-6

e

bl a r fe

There is no consolidation along attribute dimensions. You cannot tag members from attribute dimensions with consolidation operators or with member formulas to calculate attribute data.

Essbase 11.1.2 Bootcamp

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Adding Attribute Dimensions to Outlines

Standard dimensions with associated attribute dimensions

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Dimensions to Outlines Tr Attribute Adding e m raeIn the example on the slide, products have attributes that describe hard-drive sizes and Attribute dimensions

Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

types. In the outline, you see these characteristics as additional dimensions associated with Product. An attribute dimension has the word Attribute next to its name in the outline. Next to the Product dimension, Drive Size and Drive Type show that these attributes are associated with the Product dimension. A standard dimension is any dimension that is not an attribute dimension. When an attribute dimension is associated with a standard dimension, the standard dimension is the base dimension for the attribute dimension.

Essbase 11.1.2 Bootcamp

17-7

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Associating Attribute Dimensions Attribute dimension association rules: • Associate with sparse standard dimensions. • Associate with a base dimension before saving the outline. • Place last in the outline. • Associate with only one base dimension.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Associating Attribute Dimensions e m raeSeveral important association rules govern members of attribute dimensions and Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

associated base dimensions:

• You can associate only sparse standard dimensions with attribute dimensions. • Before you can save an outline to the server, each attribute dimension must be associated with a base dimension. • Attribute dimensions must be the last dimensions in the outline. • An attribute dimension can have only one associated base dimension.

NOTE: With varying attribute dimensions, you can assign multiple attributes to a single base dimension member. See “Assigning Varying Attributes to Base Dimension Members” on page 18-7.

17-8

Essbase 11.1.2 Bootcamp

Lesson 17 Creating Attribute Dimensions To associate attribute dimensions with base dimensions: 1. In Outline Editor, select a sparse dimension.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

2. For the dimension, open the Member Properties dialog box. 3. Select the Attributes tab. 4. In the “Other attribute dimensions” list box, select the attribute dimension that you want to associate. 5. Click Assign.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

17-9

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 17 Creating Attribute Dimensions

Assigning Attribute Members to Base Dimension Members Member association rules: • For each attribute dimension, associate no more than one attribute per base member. • For each attribute dimension, associate all attributes at the same level in the base dimension. • Associate only level 0 attribute members.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Members to Base Dimension Members Tr Attribute Assigning e m raeWhen you associate a member of an attribute dimension with a member of a base Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

dimension, follow these rules:

• You cannot associate multiple members from one attribute dimension with the same base dimension member. For example, the Internal and External drive types cannot both be associated with the product Lightbolt 365 A. • All base dimension members associated with members of a particular attribute dimension must be at the same level. For example, all Product dimension members that have Drive Type attributes are at level 0. You cannot associate THUNDERBALL, a level 1 member, with a Drive Type attribute, because the other members of the Product dimension that have Drive Type attributes are level 0 members. • You can associate only level 0 attribute members with base members. Although attribute dimensions can have multilevel hierarchies, in the base dimension, you cannot use attribute parent levels as associated attributes.

17-10

Essbase 11.1.2 Bootcamp

Lesson 17 Creating Attribute Dimensions To assign attribute members to base dimension members: 1. For a base dimension member, open the Member Properties dialog box.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

2. Select the Associations tab. 3. In the “Available attributes” list, expand an attribute dimension, and select the level 0 attribute. 4. Click Assign. Essbase adds the selected attribute to the “Associated attributes” list.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

17-11

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Design Considerations Secondary rollup Attribute dimension

UDAs

e

Standard dimensions

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Considerations Design e m raeFor the greatest flexibility and functionality, use attribute dimensions to define attribute Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

data. They provides sophisticated, flexible data retrieval, additional calculation functionality, economy of disk space, and simplicity of design. However, in some situations, consider one of the following approaches:

• Use shared members to create a secondary hierarchy in a standard dimension. Although this approach is possibly the most common for grouping members with similar characteristics, a major disadvantage is that the outline becomes very large if the categories repeat many members. • Add UDAs to members in a standard dimension. Although UDAs provide less flexibility than attributes, you can use them to group and retrieve data. • Create a standard dimension. Additional standard dimensions provide flexibility, but they add storage requirements and complexity to a database.

17-12

Essbase 11.1.2 Bootcamp

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

These considerations also apply to varying attribute dimensions, which have the same design implications as standard attribute dimensions. The following table describes design situations for which you should consider alternative approaches for managing attribute data: Design Consideration

Alternative Approach

Analyze attributes of dense dimensions

UDAs or secondary hierarchies

Perform batch calculations of data

Secondary hierarchies or standard dimensions

Define attributes that vary over time or that associate multiple attributes with one member

Standard dimensions or varying attribute dimensions (Release 11.1.1 and later).

e

bl a r Minimize retrieval time with large numbers Batch calculation with secondary hierarchies or fe s of base-dimension members standard dimensions n tra n o calculation nbatch Each design choice has unique implications in terms of database size, a s comparisons in the performance, reporting layout, and reporting performance. Use athe h ฺ for you. ) t works e following topics as a guide for deciding which design option best e d i n u tฺ s G a t c n e m d o c Stu @ t d this e em use a r (g e to y r er cens n e li Tr e m rae

G

Essbase 11.1.2 Bootcamp

17-13

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Design Considerations: Database Size

Standar d Dimensions

Attribute Dimensions

Secondary Hierarchies

UDAs

Great im pact

No im pact

Some impact

No impact

Database architecture is changed, and database size is increased. During data load, you must reference all standard dimensions.

Data is not stored. You do not have to reference attributes in data loads.

Additional consolidation nodes are stored.

Member properties require no additional storage.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li TrConsiderations: Design Database Size e m raeAdditional standard dimensions have the greatest impact, increasing database size and Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

degrading overall performance. As a general rule for block storage databases, minimizing the number of standard dimensions increases database efficiency. During data load, you must reference all standard dimensions.

Secondary hierarchies also increase database size. Although secondary hierarchies primarily contain shared members, they also contain non-shared consolidated members that typically are stored. Attribute dimensions and UDAs have no impact on database size, because neither requires Essbase to store extra data. You do not have to reference attributes in data loads because data is associated with attributes implicitly, through the base dimension members to which they are assigned.

17-14

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 17 Creating Attribute Dimensions

Design Considerations: Batch Calculation Performance Standar d Dim ensions

Attribute Dimensions

Great impact Expanded database architecture requires inc reased calculation time.

No impact Calculations are dynamic.

Secondary Hierarchies Some im pact Additional consolidation nodes are calculated.

UDAs No impact By themselves, UDAs perform no inherent calc ulations.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li TrConsiderations: Design Batch Calculation Performance e m raeAdditional standard dimensions also have the greatest impact on batch calculation Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

performance. The more standard dimensions Essbase needs to calculate, the more data blocks are created and the more time required for calculation. Secondary hierarchies also affect batch calculation times, because they contain extra consolidated members, causing more data blocks to be created during calculation.

Attribute dimensions and UDAs do not affect batch calculation performance; Essbase calculates attribute dimensions dynamically, and UDAs have no inherent calculation properties.

Essbase 11.1.2 Bootcamp

17-15

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Design Considerations: Report Layout Standar d Dimensions

Attribute Dimensions

Secondary Hierarchies

• Are easy to use in reports

• Are not displayed by default

• Are easy to use in reports

• Can make reporting difficult (if too many standard dimensions)

• When displayed, behave like standard dimensions

• Are displayed as alternate hierarchy paths in standard dimensions

UDAs • Are never displayed in reports • Can be used to filter lists of members

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li TrConsiderations: Design Report Layout e m raeReports are where the results of your design choices affect the user. For this reason, a Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

collection of sample reports is one of your primary outline design tools. During the analysis phase of your implementation, you must evaluate the effect of your design choice on report layout.

Standard Dimensions In a report, you must reference all standard dimensions. You can create crosstab reports with standard dimensions by displaying one dimension across the row axis and another across the column axis. For example, assuming that Customer and Region Total are standard dimensions, you can view customer channels in rows and regions in columns.

17-16

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 17 Creating Attribute Dimensions Attribute Dimensions In a report, you do not have to reference attribute dimensions. You can add attribute dimensions to a report by using selection tools or by entering dimension names into Excel. When an attribute dimension is displayed in a report, the entire report is calculated dynamically, making it read-only. You can create crosstabs of two or more attributes for a base dimension by displaying one attribute in the row axis and another in the column axis. For example, if Customer is a standard dimension and Region Total is an attribute dimension, you can view customer channels in rows and regions in columns, as if both dimensions were standard. Secondary Hierarchies As secondary hierarchies are built into standard dimension hierarchies, they are exposed when users drill down dimensions, making it easy for users to find and use them. You cannot create a crosstab report with the secondary hierarchy option. For example, assuming that Channel Total and Region Total are separate hierarchies in the Customer dimension, they both must be displayed in the same report axis because they are members of the same dimension.

s

an r t n

no a as ฺ h ) t e de i n ฺ u t UDAs as nt G c UDA values are never displayed in reports. However, deyou can use member selection om u c t tools to build lists of members with similar dt@ thUDAs. is S e em use a r (g e to y r er cens n e li Tr e m rae

G

Essbase 11.1.2 Bootcamp

e

bl a r fe

17-17

Lesson 17 Creating Attribute Dimensions

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Design Considerations: Report Performance Standar d Dimensions

Attribute Dimensions

Medium to great im pact

Great potential impact

Too many standard dimensions slow overall performance.

Attributes are calculated dynamically, sometimes causing slow reporting performance.

Secondary Hierarchies

UDAs

Minor impact Results are typically stored and accessed as usual.

No impact UDAs do not affect retrievals.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li TrConsiderations: Design Report Performance e m raeAttribute dimensions have the greatest potential impact on report performance, because Cop yrig ht © 20 13, Ora cle an d/or its a ffil iate s. All ri gh ts reserve d.

all data in a report that displays attributes is calculated dynamically along sparse dimensions. Thus, Essbase must bring multiple data blocks into memory to return the calculations. To mitigate poor reporting performance, use the following guidelines: • Do not use attribute dimensions for information that must be displayed in a large percentage of your reports. • Do not associate attribute members with an extremely large number of base dimension members.

Additional standard dimensions also can affect reporting performance. As data blocks increase in size and number, Essbase needs more time to retrieve data from them. Secondary hierarchies and UDAs have no impact on report performance.

17-18

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 17 Creating Attribute Dimensions

Summary In this lesson, you should have learned to: • Describe attribute dimensions

e

• Add attribute dimensions to outlines

s

• Compare attribute dimensions to other design options

e

m rae

bl a r fe

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

17-19

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 17 Creating Attribute Dimensions

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

17-20

Essbase 11.1.2 Bootcamp

L E S S O N

1 8

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Analyzing Varying Attributes

18

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Define varying attributes • Create varying attributes

e

G

m rae

n a • View varying attribute data as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 18 Analyzing Varying Attributes

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Varying Attributes Overview A varying attribute enables you to track changes in attribute values across one or more independent dimensions. Sales of Product A

Jones

April

May

6000

12000

Smith

June

July

August

1000

1000

7000

e

bl a r fe

s

an r t n

o

n a as ฺ h ) t e de Varying attribute: Associated with i n ฺ u t Product dimension, varies with as nt G c independent dimension (Time) om tude c dt@ this S e em use a r (g e to y r er cens n e r li Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

Varying e T Attributes Overview

m attributes enable you to store changing attribute values in relation to other eVarying a r G dimensions, called independent dimensions, which in turn enables a more robust analysis of related data.

NOTE: Typed measures are available in Essbase 11.1.1 and later.

As shown in the example on the slide, you can track shifts in monthly sales as your company transitions from one sales representative to another. Representative is the varying attribute, and time is the independent dimension. Data retrievals show that sales representative Jones sold $18,000 worth of products from April through May, and Smith sold $9,000 worth from June through August. Without the use of the varying attribute, the only known sales representative would be the current representative, Smith, to whom all $27,000 in sales would be credited.

18-2

Essbase 11.1.2 Bootcamp

Lesson 18 Analyzing Varying Attributes

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Varying Attributes 1. Ensure that the outline is enabled for varying attributes. 2. Associate independent dimensions. 3. Assign varying attributes to base dimension members.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Attributes Tr Varying Creating e m raeYou can build varying attribute dimensions either manually in the outline or by using Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

Essbase Studio. Attribute dimensions become varying attribute dimensions when you associate them with sparse base dimensions and enable independent dimensions.

NOTE: Varying attributes are not supported in rules files.

You can create varying attributes manually by using Administration Services with the following workflow: 1. Enable varying attributes in for the outline. 2. Associate independent dimensions with a varying attribute. 3. Assign varying attributes to base dimension members, and, if preferred, specify a range and an association mode.

Essbase 11.1.2 Bootcamp

18-3

Lesson 18 Analyzing Varying Attributes

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Enabling Outlines for Varying Attributes

e

bl a r fe

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li for Varying Attributes Tr Outlines Enabling e m raeVarying attributes must be enabled in the outline properties before you can use them. Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

G

NOTE: If you disable varying attributes after adding them to the outline, Essbase removes all existing varying attribute associations in the outline. This operation cannot be undone.

To enable outlines for var ying attributes: 1. In Outline Editor, select the Properties tab. 2. From the “Varying attributes enabled” drop-down list, select true. 3. Save the outline.

18-4

Essbase 11.1.2 Bootcamp

Lesson 18 Analyzing Varying Attributes

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Associating Independent Dimensions

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Associating Independent Dimensions e m raeWhen you associate the varying attribute with a base dimension, you must also select Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

the independent dimensions across which the attributes will vary. Independent dimensions are either continuous or discrete.

Continuous independent dimensions are characterized by members that are listed in a continuous, meaningful order in the outline (such as a time dimension). For example, because employee management structures vary over time, you can create a manager attribute that varies over continuous ranges in the time dimension. Discrete independent dimensions are characterized by members that might appear in any order in the outline (such as a region dimension). For example, if product packaging varies regionally, you can create a packaging attribute that varies across discrete regions.

Essbase 11.1.2 Bootcamp

18-5

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 18 Analyzing Varying Attributes Because attributes can vary across multiple dimensions, you can select a mix of discrete and continuous independent dimensions to obtain variance ranges involving multiple dimensions. For example, using a discrete region dimension along with a continuous time dimension, you can track your packaging attribute as it changes over time and as it differs across regions. To associate independent dimensions: 1. On the Outline tab of Outline Editor, select a base dimension associated with an existing attribute. 2. From the Edit menu, select Edit member properties.

e

bl a r fe

The Member Properties dialog box is displayed. 3. Select the Attributes tab.

s

an r t n

Gr

no a as ฺ h ) t are displayed e de in the “Other NOTE: Dimensions not assigned to a base dimension i n ฺ u t G attribute dimensions” list box. cas t n om tude c t@ is S d e 5. Associate the attribute with one or more th independent dimensions: m e e us check box. ra dimension g a. Select an independent o ( t ry nse r e b. Optional: Continuous to change the independent dimension to en Double-click ce i r l T e Discrete. m ae 4. Select the assigned attribute that will vary across the base dimension.

c. Optional: Use the arrow button to reorder dimensions.

NOTE: Continuous is the default option for independent dimensions. Discrete dimensions must be ordered before continuous dimensions.

6. Click OK.

NOTE: If you add or remove independent dimensions after assigning attributes, all attribute assignments for the varying attribute dimension are removed and must be reassigned.

18-6

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 18 Analyzing Varying Attributes

Assigning Varying Attributes to Base Dimension Members

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Attributes to Base Dimension Members Tr Varying Assigning e m raeYou assign varying attributes to one or more members of a base dimension. You can Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

assign the attribute so that it does not vary, or you can define ranges along the independent dimensions when you assign the attribute. To assign var ying attributes:

1. Open the Member Properties dialog box for a base dimension member, and select the Associations tab. 2. Select the attribute member to assign. 3. Optional: Assign a range of variance: a. Click Add Range. The Select Independent Dimension Ranges dialog box is displayed.

Essbase 11.1.2 Bootcamp

18-7

Lesson 18 Analyzing Varying Attributes b. Select the starting range member. c. Select the ending range member.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

d. Click Add Range. You return to the Member Properties dialog box. 4. Click Assign. The attribute and its assigned range is displayed in the “Associated attributes” list. 5. Click OK.

e

bl a r fe

s

TIP: If the assigned range conflicts with an existing attribute range, you can overwrite conflicting associations, keep conflicting associations, or extend the previous association to roll into the next association.

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

18-8

Essbase 11.1.2 Bootcamp

Lesson 18 Analyzing Varying Attributes

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Viewing Varying Attribute Data Independent dimension member

Varying attribute member

e

bl a r fe

s

an r t n

Base dimension member

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Attribute Data Tr Varying Viewing e m raeYou can view varying attribute data by using existing Smart View ad hoc functionality. To Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

view varying attribute data, connect to Essbase with Smart View and create a grid that uses any combination of base dimension, attribute, and independent dimension members.

Essbase 11.1.2 Bootcamp

18-9

Lesson 18 Analyzing Varying Attributes

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

In Smart View, data perspectives enables you to specify the perspective to use for viewing data of varying attributes. The following table describes data perspective options: Data Perspective

Description

Reality (default)

Displays the data with no perspective.

Last

Displays the data using the attribute configuration for the last level 0 member of each continuous independent dimension. For example, if Year Tot is the continuous dimension and December is the last member of Year Tot, then the data is displayed using the attribute configuration for December.

First

s

an r t n

For example, if Year Tot is the continuous dimension and January is the first member of Year Tot, then the data is displayed using the attribute configuration for January.

no a as ฺfor a custom Custom Displays data based on the attribute configuration h ) t selection of continuous and discreteemembers. de i n ฺ u t For example, if you select March, Gdata is displayed using the as thent the attribute configuration m for c March. en co Stud @ dt this e To change data perspective: em use a r g in tSmart o View. 1. Open or create a(report y e r er cribbon, ns click Data Perspective. n e 2. On theeEssbase li Tr e 3. Select a data perspective (Reality, Last, First, or Custom). aem

Gr

4. If you select Custom, perform the following actions. Otherwise, skip to step 5.

a. From the Varying Attribute drop-down list, select a varying attribute dimension. b. From the Members drop-down list next to each independent dimension, select a member. 5. Click OK. 6. Refresh the worksheet.

18-10

e

bl a r fe

Displays the data using the attribute configuration for the first level 0 member of each continuous independent dimension.

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 18 Analyzing Varying Attributes

Summary In this lesson, you should have learned to: • Define varying attributes

e

• Create varying attribute

s

• View varying attributes

e

m rae

bl a r fe

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

18-11

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 18 Analyzing Varying Attributes

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

18-12

Essbase 11.1.2 Bootcamp

L E S S O N

1 9

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Analyzing Text and Dates

19

Objectives

e

bl a r fe

At the end of this lesson, you should be able to:

s

• Define typed measures • Enable typed measures

e

G

m rae

n a • Create text and date measures as ฺ h ) t • View typed measures data in Smart View e de i n ฺ u t s G t • Describe calculations based c onatyped measures n om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

o

an r t n

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Typed Measures Overview • •

Typed measures display text or dates instead of numeric values. You can select text values from drop-down lists in Smart View, and Essbase stores your choices as numbers.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Overview TrMeasures Typed e m raeText and date measures, or typed measures, extend the analytic capabilities of Essbase Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

beyond numerical data to text-based content. Storage and analysis of typed measures can be useful when a cell needs one of a finite list of text or date values.

NOTE: Typed measures are available in Essbase 11.1.1 and later.

Text measures enable cell values to contain one of an enumerated list of text labels. These labels are defined at the outline level, using a mapping artifact called a text list. For example, a product may be sold in five colors. You can represent product color as a text measure with five predefined values, one for each color. Date measures enable measures to have date-type values. Analyses that are difficult to represent using the time dimension alone are aided by the ability to process dates as data values.

19-2

Essbase 11.1.2 Bootcamp

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

For example, an application tracking depreciation records the dates on which assets were acquired. The firm is more than 40 years old, so its acquisition dates span too long a period for feasible time dimension modeling. Instead, you can use date measures to represent acquisition dates without overburdening the database. The following general guidelines apply to both text and date measures: • Add them to the existing measures dimension; for example, Accounts. • Do not aggregate them. By default, text and date measures are assigned the never consolidate operator (^). • If the measure is not designed to be aggregated, queries should be made at the same level at which data was loaded.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

19-3

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Enabling Typed Measures

e

bl a r fe

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Measures Tr Typed Enabling e m raeBefore defining text or date measures, you must enable typed measures in your outline. Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

G

To enable typed measures: 1. In Outline Editor, select the Properties tab. 2. From the "Typed measures enabled" drop-down list, select true.

NOTE: When you enable an outline to support typed measures, it cannot be reverted back to an outline that does not support typed measures.

19-4

Essbase 11.1.2 Bootcamp

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Text Measures 1. Create a text list. 2. Populate the text list with text values and map each text value to an ordinal number. 3. Associate a text measure with its corresponding text list.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e Tr TextliMeasures Creating e m raeYou can create text measures in Administration Services Console. After enabling typed Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

measures in the outline, you then create the actual measure and attach a text list.

A cell that corresponds to a text measure can have one of a finite list of up to 1024 valid text values. Internally, Essbase needs to store the text values as numbers. Therefore, a mapping of text values to numeric values is required. You define the mapping between the text and numeric values by creating a text list object, which consists of a list of text values and a numeric value that corresponds to each text value.

Essbase 11.1.2 Bootcamp

19-5

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

For example, you can create a text list object called “Customer Satisfaction Level” with the contents in the following table. The Name column contains the possible text values for a text measure, and the ID column represents the internal numeric value used by Essbase. Name

ID

Missing Name

#Missing

N/A

#OutOfRange

High

1

Medium

2

Low

3

e

bl a r fe

s

an r t n

no a as ฺ h ) t e de i n ฺ u t as nt G c om aretufordehandling cases where the textual The first two IDs, #Missing and #OutOfRange, c S data is invalid or empty. For example, if a user attempts to load an unmapped value such s dt@ i e h t as “Average” to a text measure, the cell e value would not be updated, and would display em s a u r as #Missing in a subsequent query. If a user loads a numeric cell value that is g o ( t y r nsequery would return N/A. unmapped, the rsubsequent e n e re#Missing licand Aside from #OutOfRange, all of the other IDs must be integers. T e m rae TIP: Each text value must map to a unique numeric value. Any text value that does not map to an integer in the text list object is considered by Essbase to be invalid.

G

19-6

Essbase 11.1.2 Bootcamp

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Text Lists

e

bl a r fe

s

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr Text Lists Creating e m rae

G

an r t n

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

To create text lists:

1. Select the Text List Manager tab. 2. Click New. A new row is added to the Text Lists list. 3. In the text box, enter the name of the new text list. 4. Click Apply.

Essbase 11.1.2 Bootcamp

19-7

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Populating and Mapping Text Lists

e

bl a r fe

s

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e Tr andliMapping Text Lists Populating e m rae

G

an r t n

Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

To populate text lists and map text to numeric values: 1. On the Text List Manger tab, click

to add a row.

2. In the Name column of the new row, enter a text value. This text value will be displayed in a drop-down menu when viewing an associated text measure from Smart View. 3. In the ID column, enter a numeric value. This numeric ID is the value stored in Essbase when you load the corresponding text value to an associated text measure. 4. Optional: Map the Missing and Out of Range names to numeric values. 5. Click Save.

19-8

Essbase 11.1.2 Bootcamp

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Associating Text Lists with Measures

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Lists with Measures Tr Associating Text e m raeAfter creating and populating at least one text list, and assuming that you added a target Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

measure to your measures dimension, you can associate a text list with a measure.

To associate text lists with measures: 1. Right-click a measure, and select Edit member properties. The Member Properties dialog box is displayed. 2. From the Type drop-down list, select the Text data type. 3. From the Select Text List drop-down list, select a text list. 4. Click OK.

Essbase 11.1.2 Bootcamp

19-9

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Creating Date Measures Date format in outline properties

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t s type Date Gin ameasure t c n member properties om tude c dt@ this S e em use a r (g e to y r er cens n e Tr Dateli Measures Creating e m raeUnlike text measures, date measures are not associated with text lists. However, as with Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

text lists, you must select a standard date format for date measures at the outline level. To create date measures: 1. Ensure that typed measures are enabled in the outline. 2. Create a member in the measures dimension. 3. Edit the outline properties: a. Select the Properties tab. b. From the "Date format" drop-down list, select a date format string.

NOTE: Dates loaded to a date measure must conform to the selected date format. 19-10

Essbase 11.1.2 Bootcamp

Lesson 19 Analyzing Text and Dates 4. Edit the member properties for the newly created measure: a. From the Type drop-down list, select Date.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

b. Click OK.

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

Essbase 11.1.2 Bootcamp

19-11

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Viewing Typed Measures Smart View displays text measure data in a drop-down menu.

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Measures Tr Typed Viewing e m raeIn Smart View, text measures are displayed with drop-down lists, enabling you to quickly Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

select from the list of valid text values for the measure. You can select a new text value for a measure and submit the change to Essbase, where the data is stored numerically. To view a typed measure in Smart View, include a typed measure as a member of your data grid, as you would any measure.

19-12

Essbase 11.1.2 Bootcamp

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Calculations Based on Typed Measures IF( @ISLEV ("Customer", 1) ) @ROUND( @AVGRANGE( SKIPNONE, "SalesRisk", @CHILDREN(@CURRMBR("Customer")) ) ); ELSE "Sales Risk"; ENDIF;

e

bl a r fe

s

an r t n

G

no a as ฺ h ) t e de i n OEM Sales Risk Avg is ฺ u t the average of OEM as nt G c children Sales Risk om tude c dt@ this S e em use a r (g e to y r er cens n e i lBased Tr Calculations on Typed Measures e m raeBecause typed measures are stored as numeric values in the database, they can be Cop yrig ht © 20 13, Ora cle an d/or its a ffil ia te s. Al l ri gh ts reser ved.

used for calculations such as averages counts.

Text Measure Calculations Essbase performs calculations on the underlying numeric values. Calculation results are then translated into text values, according to the text list mappings associated with the typed measure. For example, the following script calculates an average sales risk for Bigcorp customer channels, based on the sales risk assigned to each customer: IF( @ISLEV ("Customer", 1) ) "Sales Risk avg" = @ROUND( @AVGRANGE(

Essbase 11.1.2 Bootcamp

19-13

Lesson 19 Analyzing Text and Dates

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

SKIPNONE, "SalesRisk", @CHILDREN(@CURRMBR("Customer")) ) ); ELSE "Sales Risk avg" = "Sales Risk"; ENDIF;

Date Measure Calculations The following calculation functions are useful for calculations based on date measures.

e

bl a r fe

• @DATEDIFF • @DATEPART

s

an r t n

no a • @FORMATDATE as ฺ h ) t e de i • @TODATEEX n ฺ u t as nt G c • @TODAY om tude c S see the Oracle Essbase Technical For information about these functions and commands, s dt@ i e h Reference. m se t e a gr to u ( y rr nse e n re lice T e m e ra • @DATEROLL

G

19-14

Essbase 11.1.2 Bootcamp

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 19 Analyzing Text and Dates

Summary • Define typed measures • Enable typed measures

e

• Create text and date measures

s

• View typed measures data in Smart View

e

m rae

an r t n

o

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr • Describe calculations based on typed measures

bl a r fe

G

Essbase 11.1.2 Bootcamp

19-15

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2013, Oracle and/or its affiliatesฺ

Lesson 19 Analyzing Text and Dates

e

bl a r fe

s

an r t n

o

e

m rae

n a as ฺ h ) t e de i n ฺ u t as nt G c om tude c dt@ this S e em use a r (g e to y r er cens n e li Tr

G

19-16

Essbase 11.1.2 Bootcamp

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF