02-18-2022 10:12 AM - last edited on 05-02-2023 10:03 AM by JackLacava
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;
02-18-2022 10:17 AM
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 :
02-18-2022 10:45 AM
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.
02-18-2022 11:53 AM
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
02-22-2022 11:12 AM
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 🙂