Skip to main content

TWOPASS... Why TWO PASSES?

TWOPASS... Why do i need TWO PASSES for a calculation to get it right?

One of my colleague who was new to Essbase asked me.. What is TWOPASS? 

As usual, I took the standard example of % Calculation and said that 

"When you are performing % calculation using a member formula, you have to calculate again at Total level than to aggregate the percentages from child to parent. In such case, you have to re-calculate again at total level and in order for the essbase to do this, we tag the member as TWOPASS so that it will calculate again in the End. Below is the example i gave

Calculation Without TWOPASS

                 Jan        Feb      Mar      Q1
Sales        1000      1200    800      3000     
Profit          20          50      20        90

Profit %      50          24     40       114

Profit % has to be re-calculated again at Q1 to provide the correct results

Calculation With TWOPASS

                  Jan        Feb      Mar      Q1
Sales         1000      1200     800      3000     
Profit            20          50       20        90

Profit %        50          24     40       33.33
When we tag the member Profit % as TWOPASS, it calculates correctly. But, the next question he asked made me think as it's been a while that I was made to think :)

His question was not just one but two

  1. When we tag a member as dynamic calc and write a formula, it has to calculate correctly. Why do we have to tag as TWOPASS to tell essbase to calculate it again?
  2. Do we use TWOPASS only for percentage calculations or is there any other scenario where we use TWOPASS?
 There are two ways how you can perform Calculations in Essbase
  1. Build a calculation script to perform the calculation that you wanted (Batch Calculation)
  2. Use Member Formula
    • You can make the member as Dynamic Calc and essbase would calculate that member on the fly only when you retrieve (Dynamic Calculation)
    • Make it stored and calculate that member in Calculation Script (Batch Calculation because the member is stored and is explicitly calculated using a calculation script)
Essbase follows a specific order when performing a Batch Calculation or Dynamic Calculation. Understanding the order of calculation is very important which will give a clear picture to choose which option is better to perform a calculation.

So, You use TWOPASS on a member with Dynamic Calc to override the default calculation order.
Note: You can always control the order of calculation if you are using a calculation script to calculate that member

Below is the section of content from Essbase Database Administration Guide

For dynamically calculated values, on retrieval, Essbase calculates the values by calculating the database in the following order:

  1. Sparse dimensions
    • If the dimension tagged as time is sparse and the database outline uses time series data, Essbase bases the sparse calculation on the time dimension.
    • Otherwise, Essbase bases the calculation on the dimension that it normally uses for a batch calculation.
  2. Dense dimensions
    1. Dimension tagged as accounts, if dense
    2. Dimension tagged as time, if dense
    3. Time series calculations
    4. Remaining dense dimensions
    5. Two-pass calculations
    6. Attributes
 So, let's say that if your retrieve has multiple members which are dynamic calc (Across multiple dimensions) and you will tag that member as TWOPASS that needs to be calculated at last.

You can Achieve the same functionality in ASO using Solve Order Property. Using Solve Order, you can define the order of calculation similar to BSO Application.

Bottomline: Always evaluate if you really need TWOPASS as it has to calculate twice and it may take lot of time if you have complex calculations / multiple dynamic calc members.

Hope this information helps you when to use TWOPASS and when not to

Happy Learning!!!

Comments

Post a Comment

Popular posts from this blog

PBCS/EPBCS - ASO exclude shared & Dynamic

As you all are aware that Oracle releases patches to EPM cloud every month (EDMCS is released every 2 months) and the patches are applied on first-week of Friday in Dev and third-week of Friday in Prod I did a post long back about a challenge that I have faced in on-premise and how I have addressed that. New functions were released in Nov-2018 release of PBCS. Below is an excerpt from the readiness document. You can find the document here New Aggregate Storage Functions in Calculation Manager The following Aggregate Storage functions have been added to Calculation Manager. These functions filter the shared and dynamic members from the Point of View (POV). The functions can be used in the POV of an Aggregate Storage custom calculation or allocation. @FilterDynamic(Dimension Name, Member Name) removes all dynamic members from the list of members @FilterShared(Dimension Name, Member Name) removes all shared members from the list of members @FilterSharedAndDynamic(Dime...

EPM Cloud Tips & Tricks - #1

The first EPM cloud product was released in 2014 and it's been six years till date. I was recently part of an FCCS implementation project. I know what you might be thinking. Coming from completely essbase and planning background and been working on it for almost 12 years and doing an FCCS project? Well, it turned out that way and it was a change for me too than being in my comfort zone and took it as a challenge.  I have been very busy for over the past one year and I didn't really had a chance or time to get back to my blogging and sharing my knowledge. The project finally went live and I am going to share my bit of learnings. Some of it you might alread know The first tip is going to be an easy one and those who have worked in FDMEE / Data Management in the cloud, you might already know it. But, this is very important when it comes to FCCS as zeroes are valid from Balance Sheet standpoint Data Management by default doesn't load zeroes. Below is a excerpt from the document...

EPM Cloud (PBCS/EPBCS/FCCS) - Report Bursting & Reports scheduling

The first product of Oracle EPM cloud was launched in 2014 and it's been 5 years and over the course of these 5 years, Oracle has every EPM product in cloud to what is available in on-premise. With so many products under the EPM belt each with its own functionality, there is a real need to have a single unified reporting tool that can handle all your reporting requirements across all your EPM products at one place. EPRCS (Enterprise Performance Reporting Cloud Service) is the Oracle direction to address all the reporting needs for any organization of any size. If your team is responsible for the management, narrative and external reporting with the ability to author, collaborate and a solid approval process, you definitely have to consider implementing EPRCS at your organization EPRCS can connect to your EPM Cloud products, Essbase cloud and also to your Fusion Applications Essbase app. It addresses all your financial, management, narrative and disclosure reporting. I am not goi...