Skip to main content
Contributor
Feb 18, 2022 3:12 PM UTC

Aggregation Business Rule

Hello

How does one write an aggregation business rule? I know Accounts aggregate automatically, but a business  rule is needed for Entities, correct? In Essbase we could have something like:

 

FIX ("2025","Jan":"Dec","Actual")


Calc DIM ("Account","Source","Product","ResponsibilityCenter","Interco","Entity","Location");


ENDFIX;

4 replies

Employee - Mentor
Feb 18, 2022 3:17 PM UTC

Depending on what version you are on, Entity Aggregation is now in the platform and does not require any BR's.. You can read more n the Reference Guide :  

EricOsmanski_0-1645197411581.png

 

Member
Feb 18, 2022 3:45 PM UTC

There are multiple ways. One is as Eric suggested.

If you are on the latest version, you can use Aggregated Cons member to trigger an aggregation.

ChristianW
Employee - Advisor
Employee - Advisor
Feb 18, 2022 4:53 PM UTC

It doesn't work for entities, but I want to mention it anyway:

The api.data.calculate function has filter parameters, they can be used similar to the fix command:

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

api.Data.Calculate("A#Profit=A#Sales-A#COGS",,,,,"UD1#Admin.base",,"UD3#Americas.base, UD3#UK",,,,"UD7#Top.base.remove(None)",,,,)

 I hope this helps

Member
Feb 22, 2022 4:12 PM UTC

Oscar,

The most obvious way for the older versions of the OS is to run a databuffer for your E#ParentEntity.Base and do your simple math inside the loop. I know it's kind of simplistic solution, but hey, keep it simple 🙂