Essbase Dynamic Member With Self-Reference

Planning/Essbase professional like to use Dynamic member formulas. One of advantages is to take no data storage, therefore to improve overall performance. Second, it improve the correctness of calculation and can be easily and quickly verified, without waiting for calc scripts to run (some may rely on aggregation).

When you have multiple Dynamic Calc members, whether within a dimension or cross dimensions, you would have to understand the ordering between Dynamic Calc members.
1) Dynamic Calc order within a dimension follows the outline order.
2) Dynamic Calc on Sparse dimensions will come before Dynamic Calc on Dense dimensions. The reason for this is that the Block Storage need be VIRTUALLY created first before it can perform calculation.
3) Dynamic Calc on Dense dimensions will come after Dynamic Calc on Sparse dimensions.
(is this just a repetition of #2 in an opposite way?) Among the dense members, Account and Time will be calculate first, following by other Dense dimensions.
4) Dynamic Calc members with TWO-PASS CALC will calculate last.

Sounds pretty straight forwards, until you have Dynamic members with self-reference. Here is an example.

In order to calculate retained earnings, we need to create an IC (interCom) account 2980_IC (Beg of Year Retained Earnings_IC), this is the IC part of 2980. It takes the summary of 2980_IC and 2994_IC (Current Year Earning_IC) both in DEC of prior year, and retain constant for the entire current year.


Like 2994_IC, I tried to use dynamic member for 2980_IC, but the challenge is that you will have to use self-reference to 2980_IC in December. Will this cause infinite loop?

Here are the formulas and structures -

It turns out the ordering is critical, the 2980_IC_Dec must go first before 2980_IC in the outline.
It won't work if we move up 2980_IC before 2980_IC_Dec in the outline.

Following member formulas are worth to be noted -
/*AC_2994 (Current Year Earnings) = Trailing sum of  moving 12 months of AC_9999 (Net Income) */
AC_2994: @MOVSUMX (TRAILSUM, "AC_9999",12);

/*Calc CF Plan. Handle JAN differently from FEB:DEC*/
"CF_Deferred income taxes"
(
IF(@ISMBR("Jan"))

/* JYU Jan-2015, added CF_TP_Intercompany, on Feb-2015 added AC_2980_IC*/
"CF_TP_Intercompany"="Ac_2994_IC"->"Total_Inputs"->"TotalDepartment" - @PRIOR("Ac_2994_IC"->"Total_Inputs"->"TotalDepartment"->"Dec",1, @RELATIVE("Years",0))
  + "Ac_2980_IC"->"Total_Inputs"->"TotalDepartment" - @PRIOR("Ac_2980_IC"->"Total_Inputs"->"TotalDepartment"->"Dec",1, @RELATIVE("Years",0));

ELSEIF(@ISMBR("Feb":"Dec"))

/* JYU Jan-2015, added CF_TP_Intercompany, on Feb-2015 added AC_2980_IC*/
"CF_TP_Intercompany"= "Ac_2994_IC"->"Total_Inputs"->"TotalDepartment"- @PRIOR("Ac_2994_IC"->"Total_Inputs"->"TotalDepartment")
  + "Ac_2980_IC"->"Total_Inputs"->"TotalDepartment"- @PRIOR("Ac_2980_IC"->"Total_Inputs"->"TotalDepartment");
ENDIF
)

Comments

Popular posts from this blog

ESSBASE: When to Use FIX vs. IF

Essbase Currently Not Accepting Connections

HFM: Performance Tuning on Application