50
Where did that come from? Hyperion Financial Management Techniques for debugging HFM rules October 16, 2015 Chris Barbieri

Where Did That Come From? Techniques for Debugging HFM

Embed Size (px)

Citation preview

Page 1: Where Did That Come From?  Techniques for Debugging HFM

Where did that come from?

Hyperion Financial Management

Techniques for debugging HFM rules

October 16, 2015

Chris Barbieri

Page 2: Where Did That Come From?  Techniques for Debugging HFM

Finit Overview

• Founded in 2002

• 75+ employees in 20+ states

• Mostly CPAs, MBAs

• 50+ Planning / Essbase Clients

• 80+ HFM Clients

• Managed largest roll-out of HFM in North America

• Market Leader in ARM/FCM

• World Leader in FDM implementations and custom solutions

Page 3: Where Did That Come From?  Techniques for Debugging HFM

EPM Services

Full Cycle Implementations

Upgrades

Dedicated Support

Page 4: Where Did That Come From?  Techniques for Debugging HFM

Why is Finit Here?

• We make and deliver personalized financial reporting solutions and experiences.

• Listening, questioning, and analyzing

• Building relationships … not company to company, but person to person.

We are Makers and Doers

Page 5: Where Did That Come From?  Techniques for Debugging HFM

How do we achieve our beliefs?

The Finit Family

• All owners actively involved in the business

• No debt or external owners

• Prioritize the customer, not profitability

• Long term stability

• employees, not subcontractors

• Compensation model based on client satisfaction

Page 6: Where Did That Come From?  Techniques for Debugging HFM

Finit Values

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

Page 7: Where Did That Come From?  Techniques for Debugging HFM

Finit Customer Success

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

customers has led to

100% customer success

for every Finit client (225+) and every project (450+)

Page 8: Where Did That Come From?  Techniques for Debugging HFM

Some Finit Customers

Page 9: Where Did That Come From?  Techniques for Debugging HFM

Questions

Page 10: Where Did That Come From?  Techniques for Debugging HFM

About the Presenter

• Global contribution to Oracle EPM community• Hyperion Financial Management

• Hyperion Enterprise

• 17 years of Hyperion Experience• Customer / administrator

• Micro Control

• Hyperion Enterprise

• Hyperion Employee• Pioneer consultant on HFM

• Sr. Product Issues Manager

• Oracle Partner• HFM Practice Leader

• EPM System Architect

• Thought leader in HFM application and system design and performance

Expert in tropical places and rock & roll ☺

Chris [email protected]

Page 11: Where Did That Come From?  Techniques for Debugging HFM

Topics

• Objectives

• Where did that number come from?

• Review of rules and the value dimension

• Getting to the root of the problem

• Debugging Classic Rules

• Write To File

• The art of debugging

Page 12: Where Did That Come From?  Techniques for Debugging HFM

Trace the Problem

• Symptoms often show up in top entities

• Very difficult to find root cause there

• Drill back to the inflection point: Start from good

• Base Entity

• Walk up the Value dimension

• Base Customs, ICP and Account

• Was the Prior Period okay?

• Identify the problem point by taking a bottom-up approach

• Don’t forget to check the Calc Status!

Page 13: Where Did That Come From?  Techniques for Debugging HFM

Walk the Value Dimension

• Create a grid with Entity in rows, Value in columns

Connect the dataConnect the dataConnect the dataConnect the data…………

…with the Calc Status…with the Calc Status…with the Calc Status…with the Calc Status

Page 14: Where Did That Come From?  Techniques for Debugging HFM

Pay Attention to the Calc Status

• Tracks whether rules have been run since• Last data change• System (Metadata/rules) change

• Enables HFM to run rules only where needed

• Utmost importance for trusting the numbers… “OK” doesn’t mean the logic is correct

Never had dataNever had dataNever had dataNever had data Data has changedData has changedData has changedData has changed System has changedSystem has changedSystem has changedSystem has changed

Page 15: Where Did That Come From?  Techniques for Debugging HFM

Read Cell Information

• Right-click on a cell to view Cell Information

• Reveals the full POV

• Displays Calculation Status

• And suggested action

Page 16: Where Did That Come From?  Techniques for Debugging HFM

Calc Status: Action Required

Status Required Action Objective When Needed

“Changed”

Calculate Run all logic in local

currency

• Data has been changed

• A journal has been

posted/un-posted

“Needs

Translation”

Translate Translate all

accounts from local

currency balances

into target currency

• Foreign currency entity

has had a data or journal

change

“Needs

Consolidation”

Consolidate Add up data from

children, perform

eliminations

• Data from one or more

base entities has

changed

“OK”

(do nothing) Data has been

calculated

• Nothing has changed

since logic was last run

Page 17: Where Did That Come From?  Techniques for Debugging HFM

Currencies Outside the Hierarchy

• Have a grid like this, and “Translate/Force Translate”?

• Be careful about currencies which are not any parent’s• “Consolidate” only runs on currencies according to the entity

hierarchy

1) Create a hierarchy

2) Create a task flow

3) Manually ‘babysit’

4) ICP report might

translate these*

1) Create a hierarchy

2) Create a task flow

3) Manually ‘babysit’

4) ICP report might

translate these*

Possible solutionsPossible solutions

Page 18: Where Did That Come From?  Techniques for Debugging HFM

HFM Sub Routines: Commonly Used

• Calculate• 80% of business logic• Calculations for the trial balance• Bring P&L into Current Year Retained Earnings• Roll-forwards and Cash Flow

• Translate• Non-standard translations

• Consolidate• Vary from out-of the box consolidation and eliminations

• Write eliminations to a custom member

• Apply consolidation methods, including minority interest

• NoInput• Data entry “mask”

• Dynamic• Ratios

Page 19: Where Did That Come From?  Techniques for Debugging HFM

HFM Sub Routines: Less Commonly Used

• Allocate• Write back from parent entities to base entities

• Equity Pick Up• Multi-pass consolidation logic

• Input• Input base level accounts and customs, but in a parent entity

• On-Demand• Introduced in 11.1.2.3 for Forms

• Transactions• Introduced in 4.0

• Specifies accounts enabled for intercompany transactions

Page 20: Where Did That Come From?  Techniques for Debugging HFM

Rule Execution in the Value Dimension:In the beginning – a base entity

<Entity Curr Adjs><Entity Currency>

<Entity Curr Total>

Aggregation – data not stored

Rule execution – data stored

Data entry and

loads hereJournals

here

Unexpected data

here is the result of:

• Data or journals

• Metadata

attributes

• Sub Calculate

Unexpected data

here is the result of:

• Data or journals

• Metadata

attributes

• Sub Calculate

Page 21: Where Did That Come From?  Techniques for Debugging HFM

Rule Execution in the Value Dimension:Next steps– a base entity

<Entity Curr Total>

Aggregation – data not stored

Rule execution – data stored

Journals in parent’s

currency here

Unexpected data

here is the result of:

• Journals

• Metadata

attributes

• Default

translation

• Sub Translate

• Sub Calculate

Unexpected data

here is the result of:

• Journals

• Metadata

attributes

• Default

translation

• Sub Translate

• Sub Calculate

<Parent Curr Adjs><Parent Currency>

<Parent Curr Total>

Zero here means:

• There is no Exchange Rate

• Or a rule has zeroed it out

after translation

Page 22: Where Did That Come From?  Techniques for Debugging HFM

[Contribution Adjs]

Rule Execution in the Value Dimension:Contribute to your parent – a base entity

[Parent Adjs]

[Elimination]

[Parent]

[Proportion]

[Contribution Total]

[Contribution]

[Parent Total]

Aggregation – data not stored

Rule execution – data stored

Is [Parent Total] correct?

It’s the starting point for

Sub ConsolidateUnexpected data here is the result of:

• Sub Consolidate

• Methods

• Intercompany eliminations

• Sub Calculate

• [Active]

• Scenario attributes

Page 23: Where Did That Come From?  Techniques for Debugging HFM

Rule Execution in the Value Dimension:Moving on up… to the parent entity

<Entity Currency> of the

parent entity =

Sum of [Contribution Total] of

its children

… and the value dimension

begins again for the parent

entity and its siblings

Page 24: Where Did That Come From?  Techniques for Debugging HFM

Applied Example

Page 25: Where Did That Come From?  Techniques for Debugging HFM

Where Did That Come From?

Page 25

What I got

Page 26: Where Did That Come From?  Techniques for Debugging HFM

Check the Metadata

Page 26

Entity attributes Account attributes

Page 27: Where Did That Come From?  Techniques for Debugging HFM

I wish I could see what it’s doing…

Page 27

Page 28: Where Did That Come From?  Techniques for Debugging HFM

Write To File

• Not a standard HFM-provided subroutine

• … but very commonly used

• HFM’s VBScript rules permit more than just HFM calculations

• Easy for HFM to generate a text file during rule execution

• File created by HFM DCOM user

• System account that runs CASecurity.exe, HsxServer.exeand HsvDatsource.exe processes

• File can reside any place the DCOM user AND you (human, HFM user) can Read/Write

• Often directly on the HFM server

• Requires Remote Desktop access

• Or a shared folder available on the network

• Inside the firewall

Page 29: Where Did That Come From?  Techniques for Debugging HFM

The Write To File Sub Routine

Page 30: Where Did That Come From?  Techniques for Debugging HFM

Generate a Simple File

• Make sure the Write To File works

• And that you can access it

• Create a “road sign” that the sub routine will start

• Orient yourself by adding POV details

• Exercise in string concatenation

sPovValue <Entity Currency>

Name of variableName of variable Content of variableContent of variable

Page 31: Where Did That Come From?  Techniques for Debugging HFM

Sample Output

Page 32: Where Did That Come From?  Techniques for Debugging HFM

Add Variables and Comments to Yourself

• The art of debugging is to write intelligible, actionable notes to yourself

• Give yourself as many clues as possible

Log every variable you’re

using, watch for nulls

Use line numbers for

navigation

Write out each member in

the list

Page 33: Where Did That Come From?  Techniques for Debugging HFM

Check Your Variables

Page 33

• Capture both the variable name AND its contents

• If you see the variable name followed by nothing, it means it’s not defined

Page 34: Where Did That Come From?  Techniques for Debugging HFM

Tip: Working With Text

Page 34

• Text is case-sensitive“APR” is not equal to “apr”

• Instead useUCASE(text)

LCASE(text)

StrComp(text1, text2, vbTextCompare) = 0

• Easy to manipulate text• VBScript functions

Left(text, number of characters)

Right(text, number of characters)

Mid(text, start position, number of characters)

• ConcatenatestrName = “Chris” & “ ” & “Barbieri”

• Can’t perform “math” on text• “<“ or “>” are based on alphanumeric sequence

“APR” is less than “MAR”

“APR” is less than “apr”

Page 35: Where Did That Come From?  Techniques for Debugging HFM

Now What?

Changed, but still not

expected

Walk the value dimension

Corrected the case problem

Page 36: Where Did That Come From?  Techniques for Debugging HFM

Dig a Little Deeper

Custom dimensions aren’t

the same for both accounts!

“Taxes” not flagged IsCalculated“Taxes” not flagged IsCalculated

Page 37: Where Did That Come From?  Techniques for Debugging HFM

Tip: Check Your Sources

• HS.EXP sets data in the same intersectionson the right to those on the left• All valid intersections

• Be explicit! Balance the seesaw

Account Account

ICP

Customs

=

Account

ICP

Customs

Account

ICP

Customs

=

Which ICP or

Customs will

be written to?

[None]? Tops?

Only [None] was valid for “Taxes” in Customs 2-4

Custom1 Product is the same

Only [None] was valid for “Taxes” in Customs 2-4

Custom1 Product is the same

Page 38: Where Did That Come From?  Techniques for Debugging HFM

Tweak The Rule

Pull TotalProducts into [None]

Clear out the residual data

Only necessary if the account/custom is not IsCalculatedOnly necessary if the account/custom is not IsCalculated

Page 39: Where Did That Come From?  Techniques for Debugging HFM

Log File Management Tips

• Output log appends each new text item

• Including from one session to the next

• Delete the file as needed

• Make it easier to navigate

• Hard to find answers among 10,000 lines of messages

• “Take only what you need”• Execute calculations as narrowly as

possible

Page 40: Where Did That Come From?  Techniques for Debugging HFM

Getting Closer

Page 40

Italy has no taxes, as expected

But why is this negative?

And not 35%

Add all customs and ICPAdd all customs and ICP

Page 41: Where Did That Come From?  Techniques for Debugging HFM

Very Close Now…

Page 41

Page 42: Where Did That Come From?  Techniques for Debugging HFM

Trick: Set the Targets Equal

Page 42

• Shake out any differences – remove the rate

• Still a difference

• Strip out all Sub Calculate except this one rule

Page 43: Where Did That Come From?  Techniques for Debugging HFM

Is the Intersection Correct?

Page 43

• Look in a web grid at the cell you’re reading from

Page 44: Where Did That Come From?  Techniques for Debugging HFM

Found it!

Page 44

• Custom3: needed TotalC3 rather than TotalChannels

• Update the rule

• Hurrah! I’m getting the right intersection

• Add back the other rules and continue

Page 45: Where Did That Come From?  Techniques for Debugging HFM

More Useful Tips

Page 46: Where Did That Come From?  Techniques for Debugging HFM

Tip: Debug a Number

• Fetch a number from an HFM intersection• Must use “GetCell” or a variant

• GetCell yields a number in a cell

• GetCellRealData also tells if the number is derived (gray)

• GetCellNoData tells if the cell is empty or not

• Must be ‘one number at a time’

• Can’t embed this inside Call WriteToFile• Fetch it just before you need it

• Or pass along a variable that should contain a number• Percentages are common for Allocations:

• fProductAllocationPct

• fChannelRevenue

• fDenominator

Page 47: Where Did That Come From?  Techniques for Debugging HFM

Life of a Variable

Page 47

• By default, it is only defined for the current subroutine

• By default, it is not passed into other subroutines

Call Useful(sPovEntity, bIsLastPeriod)

Sub Useful(sPovEntity, bIsLastPeriod)

If sPovEntity = “Boston” And bIsLastPeriod = True Then

Do something useful

End If

End Sub

• Could redefine it within each subroutine• Risk it being defined differently

• Use Public variables for string constants• Do NOT use Public for POV variables

Page 48: Where Did That Come From?  Techniques for Debugging HFM

HFM Administrator Guide

Page 48

• Check out Chapter 10 in the HFM Administrator Guide

http://docs.oracle.com/cd/E57185_01/

epm.1112/hfm_admin_11124100/fram

eset.htm?launch.html

• Also available online

Page 49: Where Did That Come From?  Techniques for Debugging HFM

Thank you for attending!

Questions?

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

[email protected]

Past webinars:

www.finitsolutions.com/webinars

Presenter:

Chris Barbieri

[email protected]

General Questions:

Greg Barrett

[email protected]

Joe Mizerk

[email protected]

Page 50: Where Did That Come From?  Techniques for Debugging HFM

Questions?

Use the code “Finit” for $100 discount

when you register for Kscope16