Presentation is loading. Please wait.

Presentation is loading. Please wait.

UNIT 3 Calculation Script Architecture. Topics When to use calc scripts Calc Script Editor and online help Database, dimension and member calculations.

Similar presentations


Presentation on theme: "UNIT 3 Calculation Script Architecture. Topics When to use calc scripts Calc Script Editor and online help Database, dimension and member calculations."— Presentation transcript:

1 UNIT 3 Calculation Script Architecture

2 Topics When to use calc scripts Calc Script Editor and online help Database, dimension and member calculations Focus calculations Generate member lists Boolean functions Mathematical functions

3 Introducing Calc Scripts Components of calc scripts Calc Script Editor and online Help Commands and functions

4 Using Calc Script Editor (Demo)

5 Using Essbase Documentation (Demo) Essbase manuals Product online Help HTML formatted documentation Technical Reference

6 Exercise 3-1: Explore Calc Script Editor and Online Help

7 Exploring Essbase Calc Script Functionality Functional command and functions Control flow commands (focus) Macro functions Conditional commands Boolean functions Operators Math functions

8 Using Functional Commands CALC ALL CALC DIM MEMBER CALC Other CALC script commands

9 (CALC ALL) Low Level data loaded Calculating the Database Using CALC ALL Entire database is calculated. Data is calculated based on outline consolidations and member formulas. Syntax: CALC ALL [EXCEPT DIM(dimList)| MBR(mbrList)];

10 Calculating Dimensions Using CALC DIM Calculates a specified dimension or a list of dimensions Calculates first dimensions tagged as Accounts and as Time Calculates dense dimensions before sparse Syntax: CALC DIM(Accounts); (CALC DIM) Low Level data loaded

11 Calculating Members Using Member Calc Unary operators and equations All database combinations for referenced member Syntax: MemberName ;

12 Exercise 3-2: Use Calc Functions

13 Focusing Calculations FIX…ENDFIX IF…ELSE…ELSEIF…ENDIF CROSS DIM OPERATOR ->

14 Focusing Calculations Using Fix…Endfix Isolates a portion of the database Syntax: FIX(mbrlist) commands; ENDFIX East South North West Jan Feb Mar Jun Actual Budget FIX (East)

15 Focusing Calculations Using Conditional Statements IF…ENDIF IF…ELSE…ENDIF IF…ELSEIF…ENDIF IF…ELSEIF…ELSE…ENDIF

16 Focusing Calculations Using IF...ENDIF Performs conditional tests before performing a calculation Commission (IF(Sales > 200000) Commission = Sales *.012 ; ENDIF) IF condition is TRUE then do statement. IF condition is FALSE, then skip statement.

17 Focusing Calculations Using ELSEIF…ELSE Performs conditional test if IF statement is FALSE Commission (IF(Sales >= 200000) Commission = Sales *.12; ELSEIF (Sales >= 100000) Commission = Sales *.098; ELSE Commission = Sales *.05; ENDIF)

18 Focusing Calculations Using Cross Dim A pointer to data values of specific member combinations Syntax: -> Budget Actual Sales COGS Margin Margin% Jan Feb Mar Jun Sales->Jan->Actual

19 Exercise 3-3: Focus Calculations

20 Generating Lists Using Macro Functions Family @CHILDREN @DESCENDANTS @SIBLING @RELATIVE Generation and level @GENMBRS @LEVMBRS Others @UDA @MATCH

21 Generating Lists Using @ICHILDREN Includes the specified member and all members in the level immediately below the specified member Given this outline FIX(@ICHILDREN(West)) … ENDFIX Applies calculations to the following: West, California, Oregon

22 Generating Lists Using @IDESCENDANTS Includes the specified member and either all descendants or only the descendants down to a specified generation or level. Given the outline FIX(@IDESCENDANTS(WEST)) … ENDFIX returns the following: West,California,San Diego,San Francisco, Los Angeles, Chico, Oregon

23 Generating Lists Using @UDA Generates a list of members that have the referenced UDA Given the outline, FIX(@UDA(MARKET,”Small Market”)) … ENDFIX applies calculations to the following: Connecticut, New Hampshire, and South

24 Generating Lists Using @MATCH Allows you to perform a wild-card search for members 100-10 100-20 200-10 200-30 300-20 Given the following members FIX(@MATCH(PRODUCT,”???-10”)) … ENDFIX Returns the following : 100-10,200-10

25 Exercise 3-4: Using Macro Functions

26 Testing for Values Using Boolean Functions @ISDESC @ISMBR @ISLEV Logical connectors

27 Testing for Values Using @ISDESCENDANTS Tests member during calculation to determine appropriate formula for payroll Payroll (If (@ISDESC(East) OR @ISDESC (West)) Payroll = Sales *.15; ELSEIF (@ISDESC (Central)) Payroll = Sales *.11; ELSE Payroll = Sales *.10; ENDIF)

28 Testing for Values Using @ISMBR Tests to see if a member is present for a specific calculation Fix (East) Commission ( If (@ISMBR(New York: New Hampshire)) Commission = Commission * 1.25 ; Endif ) Endfix

29 Testing for Values Using @ISLEV Tests to see if a member is present for a specific calculation If the calculation is positioned on New York: @ISLEV(“Market”,0) is TRUE and @ISLEV(“Market”,1) is FALSE

30 Using Logical Connectors with Boolean Functions AND OR NOT

31 Exercise 3-5: Using Boolean Functions

32 @VAR @TRUNCATE @MIN @MOD Transforming Values with Math Functions @VARPER @ROUND @MAX @ABS

33 Transforming Values with @VAR and @VARPER @VAR Calculates the variance (difference) between the values of two members @VAR(Actual,Budget) @VARPER Calculates the variance (difference) percent between the values of two members VARPER(Actual,Budget)

34 Transforming Values with @TRUNCATE and @ROUND @TRUNCATE Removes the fractional part of an expression and returns the integer. Total_Sales = @TRUNCATE( @SUM(Direct_Sales: Other_Sales)); @ROUND Rounds an expression to the nearest whole number or to a specifically decimal Profit = @ROUND("Profit_%”);

35 Transforming Values with @MIN and @MAX @MIN Returns the minimum value among the results of an expression Qtr1 = @MIN(Jan:Mar) ; @MAX Returns the maximum value among the results of an expression Qtr1 = @MAX(Jan:Mar) ;

36 Transforming Values with @MOD Calculates the modulus (the remainder) of a division operation Factor = @MOD("Margin %", "Profit %"); “Margin %” = Dividend “Profit %” = Divisor

37 Transforming Values with @ABS @ABS returns the absolute value of an expression. Variance = @ABS(Actual-Budget) ; The absolute value turns negative numbers into positive numbers: @ABS(-5) = 5 @ABS(+5) = 5

38 Exercise 3-6: Math Functions

39 Test Your Understanding


Download ppt "UNIT 3 Calculation Script Architecture. Topics When to use calc scripts Calc Script Editor and online help Database, dimension and member calculations."

Similar presentations


Ads by Google