Skip to Content
0
Aug 25, 2020 at 05:32 PM

Calculation on a hierarchy

85 Views

Hey I have the following issue:I have an account dimension

with a hierarchy of "suppliers" where the leaf level are many categories of suppliers (for example water or transport etc)

I want to create an account that will be called "taxes on supplier" that would multiply the summary of suppliers costs by a number

(I can't work on the leaf level because there are too many, and also because I cannot be sure that my customer won't add suppliers accounts in the future)

The reason I choose data action is because I need to "FOREACH" the period of the taxes

how can I do it? I've tried "config.hierarchy" but it doesn't helpI've tried to add an attribute, using the below code it also doesn't helpI'm a bit lost:
MEMBERSET[d/CML_SCOA_CASHFLOW].[p/TAXABLE]="SUPPLIER"
MEMBERSET[d/Date]=%FROM_BUD% TO %TO_BUD%

DELETE([d/CML_SCOA_CASHFLOW] = "S_TAXES")
DATA([d/CML_SCOA_CASHFLOW]="S_TAXES")=
RESULTLOOKUP()*0.17

I've tried to set 2 memberset but I'm doing it wrong:

MEMBERSET[d/CML_SCOA_CASHFLOW]=( "S_TAXES",[d/CML_SCOA_CASHFLOW].[p/TAXABLE]="SUPPLIER")