finit formula and business rule efficiency in one stream

Post on 09-Jan-2017

115 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Formula and Business Rule Efficiency in OneStream

July 29, 2016

Aaron Bolshoun

Finit Services

Slide 2

Full Cycle Implementations

Upgrades

Dedicated Support

The Finit Family

Slide 3

Fully aligned with our clients, not just bottom line $

No debt or external ownership

Work with Finit employees, no subcontractors

Compensationbased on CLIENT SATISFACTION

PRIVATELY OWNED

CLIENT SATISFACTION

NOSUBCONTRACTORS

DEBT FREE

Finit Values

Slide 4

Our values on which we ask you to provide consultant feedback:

• Approach & Collaboration

• Integrity & Honesty

• Client Betterment

• Self Betterment

• Colleague Betterment

• Finit Betterment

• Work Effectiveness

• Impact & Innovation

• Proactiveness & Passion

Service Solutions Betterment

Finit Customer Success

Slide 5

Our values, culture, and approach to becoming a trusted advisor to our

customers has led to

100% customer success

for every Finit client (250+) and for every Hyperion and OneStream project (800+)

Slide 6

Some Finit Customers

Questions

Slide 7

Upcoming OneStream Webinar

Slide 8

Friday August 19th

Creative Solutions for Cash Flow & FX Analysis through Dashboards

Presented by Jay Hampton & Christine Ong-Estrada

About the Presenter

Slide 9

Aaron Bolshoun(abolshoun@finit.com)

Certification/Education

• MBA - Business InformationTechnology, University of Denver

• BA - Northwestern University

• HFM Certified

Experience

• 3 years with OneStream

• 10 years with HFM

• 10 years with FDM

• 10 years of EPM / CPM Implementation experience

Agenda

Slide 10

• Formula Efficiency

• Data Buffers

• New Functionality available in 3.7 Release

OneStream XF Formulas

Elements of OneStream that can be Customized

Slide 12

• Member Formulas• Formula Pass

• Dynamic Calc

• Business Rules• Finance

• Parser

• Connector

• Conditional

• Derivative

• Dashboards: Method Queries, SQL Scripts

• Transformation Rules: Complex Expressions

• Confirmation Rules

• Data Cells

• Dashboard Data Set

• Dashboard Extender

• Dashboard XFBR String

• Extensibility

• Event Handler

• Drill-Down

Efficiency

Slide 13

Types of Formula Efficiency

Slide 14

Different Types of Formula “Costs”:

1. Efficient Processing

2. Efficient Maintenance

3. Efficient Storage

4. Efficient Script Creation

Efficient Processing

Slide 15

Preferred Methodology1. Can I do this without any formulas? Is it possible to produce result

via metadata attributes and hierarchy? (Account type and/or Aggregation Weight)

• No impact to processing

2. Can I build this as a Dynamic Calculation?• No impact to consolidation time, but takes time to calculate

in memory when a report is run.

3. Can I build this as a Member Formula (Formula Pass)?• Stored in database, so increases consolidation time,

but no impact to report generation.

4. Can I build this as a Business Rule?• Stored in database, so increases consolidation time,

but no impact to report generation.

Dynamic vs. Stored Calculations

Slide 16

Dynamic Calculation

Formula Pass

Dynamic Calculation vs. Member Formula

Slide 17

Dynamic Calculation

MemberFormula

No Impact Consolidation Time Much Slower

Much Slower Report Generation No Impact

Unnecessary Consolidation Required

Can use Formula Pass or Dynamic Calc in Source

Use with other formulas

Can use Formula Pass in Source

Data must already be consolidated if source contains a Formula Pass

DependenciesMust assign Formula

Pass 1-16 accordingly

Do not aggregate Aggregation Aggregate naturally

Efficient Processing

Slide 18

• From the XF Design and Reference Guide:

“Consolidation performance is directly impacted by the volume and complexity of Stored Calculations. Careful consideration should be given to each Stored Calculation since …. a large amount of data being written to the Cube would negatively impact Consolidation performance …. The quantity of stored numbers is the most important factor when optimizing Consolidation performance.”

Member Formula vs. Business Rule

Slide 19

• Member Formulas will always perform better than Business Rules: Member formulas are multi-threaded (parallel) while Business Rules run sequentially (serial)

• Some logic, like custom Consolidation or Member Lists, must occur within a Business Rule—API vs. BRAPI

Efficient Maintenance

Slide 20

• We need to build all logic with the understanding that we will eventually hand it over to someone else to maintain

• We need to make troubleshooting easier

• Formulas should be as dynamic as possible

• Use Comments!!!!

• HFM vs. OneStream: With great flexibility comes great complexity! Where exactly does that logic reside?• HFM: It’s in the rules file.

• OneStream: • Member Formulas (on Account, Entity, Flow, UD’s, etc.)

• Business Rules

Lists of Formulas by Formula Pass

Slide 21

Grid View

Formula List Dashboard

Formula for Calculation Drill-Down

Slide 22

• Entering a formula in the Formula for Calculation Drill Down property allows drilling on calculated Scenario, Account, Flow and UD members

Efficient Storage

Slide 23

• Storage isn’t free—it has costs associated

• Every Stored Member creates a record which takes up storage space in the database when data is consolidated

• Be Specific: much more efficient to write to one specific member instead of all of them

Efficient Storage: Data Explosion

Slide 24

• OneStream warns upon consolidation about a formula that will cause data explosion:

API.Data.Calculate

• Tips to Avoid Data Explosion• Use same level of detail on target (left side of =) as on the source

(right side of =)

• Do not use #All in Stored Member formulas

Formula Result

“A#Profit = A#Sales” No Data Explosion

“A#Profit:U2#Cust1 = A#Sales * 1.05” No Data Explosion

“A#Profit = A#Sales:U2#Cust1” Some Data Explosion

“A#Profit = 2.0” Large scale data explosion

Efficient Script Creation – Script Editor

Slide 25

• Color Coding:

• VB is blue

• API is black

• Strings are red

• Comments are green

• IntelliSense

• Integrated Script Library with filter:

• No need to “re-invent the wheel” – use existing code as starting point (GolfStream as a reference)

• OneStream Script Editor provides many tools to simplify the process:

Efficient Script Creation – Rule Snippets

Slide 26

• Sample code for common calculations that integrates with Script Editor is available in the XF MarketPlace• Common Account formulas (e.g. Current Ratio)

• Formula for Calc Drill Down

• Writing to Error Log

• Confirmation Rules

• Member Lists

• Eval

• Many more & list

continues to grow!

TroubleShooting & Optimization: Logging

• api.LogMessage(message, detail) and api.LogError(errorLevel, description)

• Consolidate with Logging provides visibility into all calculations that run and how long each one takes

• Entries are logged in Task Activity Log

Slide 27

Consolidate with Logging

Slide 28

Balancing priorities:

Slide 29

1. Efficient Processing

2. Efficient Maintenance

3. Efficient Storage

4. Efficient Script Creation

Data Buffers and Eval Buffers

Slide 30

Data Cell vs. Data Unit vs. Data Buffer

Slide 31

• Data Cell• One number uniquely represented by

a Cube and 18 dimension members

• Data Unit• All data for a single:

Cube, Entity, Parent, Cons, Scenario, Time

• E.g., Calculate one Entity/Period 1 Data Unit

• Data Buffer• A subset of data in a Data Unit

• E.g., A#Salary contains numbers for all Cost Centers

Data UnitDimensions

Account-type Dimensions

Data Unit Concepts

Slide 32

Stored Formulas run for an entire Data Unit

Cube and 5 Data Unit dims are known Valid: If api.Pov.Entity.Name.XFEqualsIgnoreCase(“CO”) Then

Account-type dims can be anything Not Valid: If api.Pov.Account.Name … or If api.Pov.UD1.Name …

Conditional logic requires Eval

Avoid using api.Data.Calculate in a loop (performance)

APIs api.Data.Calculate (easiest to use)

Eval (most flexibility)

api.Data.GetDataBuffer (legacy cell-level processing)

Eval Buffer Example

Slide 33

• api.Data.Calculate("A#Bonus = A#Salary * Eval(A#BonusLevel)", AddressOf OnEvalDataBuffer) • Bonus by Cost Center using BonusLevel and Eval

• Order of Operations• A#Salary – Data Buffer is retrieved from storage

• A#BonusLevel – Data Buffer is retrieved from storage

• Eval evaluates and modifies the BonusLevel Data Buffer

• Data Buffer Math creates a new Data Buffer

• A#Bonus - The new Data Buffer is stored

Eval Buffer Example - Formula

Slide 34

Eval Filtering – Method 1

Slide 35

• Filter using api.Data.Calculate:

• Syntax: api.Data.Calculate(formula, accountFilter, flowFilter, originFilter, icFilter, ud1Filter, ud2Filter, ud3Filter, ud4Filter, ud5Filter, ud6Filter, ud7Filter, ud8Filter, onEvalDataBuffer, userState)

• For example:

api.Data.Calculate("A#Bonus = A#Salary * 0.05", "", "", "", "", "U1#Selling.Base, U1#Eng")

Eval Filtering – Method 2

Slide 36

• Eval Filters the new Data Buffer:

• For example:

api.Data.Calculate("A#Bonus = Eval(A#Salary * 0.05)”, AddressOf OnEvalDataBufferFilter)

• Generates the same result as Method 1

Eval Filtering – Method 2 Formula

Slide 37

New Functionalityin Version 3.7

Slide 38

Convert Unbalanced

Slide 39

• AddUnbalanced, SubtractUnbalanced, MultiplyUnbalanced, and DivideUnbalanced

• Used to avoid data explosion when varying level of Account-Type dimensions are required in a formula

• Valid:

api.Data.Calculate("A#6050 = A#5000 * A#3000")

• Bad Idea:api.Data.Calculate("A#6050 = A#5000 * A#3000:O#Top")

api.Data.Calculate("A#6050:O#All = A#5000:O#All * A#3000:O#Top")

Convert Unbalanced

Slide 40

• Instead, use new Convert Unbalanced functions:

api.Data.Calculate("A#6050 = MultiplyUnbalanced(A#5000, A#3000:O#Top,

O#Top)")

• First two parameters are Data Buffers to be multiplied (or added or subtracted or divided)

• Third parameter is the Account Type dimension member that will always be used with first parameter, without causing data explosion.

Get Data Buffer Using Formula

Slide 41

• Allows use of an entire math function to calculate a final data buffer:

• Syntax: Dim objDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula(formula, scriptMethodType, changeIdsToCommonIfNotUsingAll, expressionDestinationInfo, onEvalDataBuffer, userState)

• For example:

Dim myDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("A#Sales – A#Costs")

Get Data Buffer Using Formula Variables

Slide 42

• After creating a data buffer variable, it can be named as a Formula Variable and then reference inside api.Data.Calculateor inside other calls to api.Data.GetDataBufferUsingFormula.

• This provides a lot of flexibility and it can even improve performance because you can calculate a data buffer once and re-use the variable multiple times instead of recreating it.

• For example:

Dim myDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula("A#Sales – A#Costs")

api.Data.FormulaVariables.SetDataBufferVariable("myDataBuffer", myDataBuffer, False)

api.Data.Calculate("A#Profit = A#5000 + $myDataBuffer")

Get Member Names from ID’s

Slide 43

• Allows identification of Member Names when looping:

• For example:

For Each sourceCell As DataBufferCell In myDataBuffer.DataBufferCells.Values

Dim accountName As String = sourceCell.DataBufferCellPk.GetAccountName(api)

Dim ud1Name As String = sourceCell.DataBufferCellPk.GetUD1Name(api)

Next

Log Contents of Data Buffer

Slide 44

• Allows logging of Data Buffer contents for Debugging

• Third parameter indicates number of records to be logged.

• For example:myDataBuffer.LogDataBuffer(api, "MyDataBuffer Output", 1000)

Slide 45

Questions?

Thank You for Attending!

Slide 46

Today’s Presenter:

Aaron Bolshoun

abolshoun@finit.com

General Questions:

Greg Barrett

gbarrett@finit.com

Copy of the slides or Recording:

Email us for a copy of the slides or a link to the recording

insights@finit.com

Past webinars:

www.finit.com/webinars

Follow us on Twitter for updates:

@Finit_Solutions

top related