cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic - Aggregate

nicky_hays
Participant
0 Kudos

Hi,

I am using BPC 10.1 on HANA Engine: Javascript

How can I get the sum of the values of all the base members of a particular hierarchy in Script logic. For example my customer dimension has a Group / Hierarchy - VERY_LOYAL  and the base members are A,B , C, D... Q How can I get the sum of the  sales of all the  base members dynamically rather than just adding them up?

Sincerely,

Nicky

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Nicky,

The question is: WHAT FOR?

"How can I get the sum of the values of all the base members of a particular hierarchy"...

In case of multiple hierarchies for single dimension (let it be CUSTOMERS) you need to have a root parent (even artificial) for this hierarchy. For example VL_ROOT

Then:

*XDIM_MEMBERSET CUSTOMER=BAS(VL_ROOT)

*WHEN CUSTOMER

*IS *

*REC(EXPRESSION=%VALUE%,CUSTOMER=SOMETARGETBASEMEMBER)

*ENDWHEN

In some cases you can directly use:

*REC(EXPRESSION=...*[CUSTOMERS].[VL_ROOT]...)

Vadim

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nicky,

have you tried to use that parent node, it should return the sum of the hierarchy.

Or what are you trying to do? maybe you need to multiple with each base member.

Andy