cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to agreggate total member leaves of parent in advance formula Data Action script

nmahatoo2023
Discoverer
0 Kudos

Hi, I am trying to script a data action advance formula to calculate the sum OPEX by 3 categories and calculate VAT on each category.

I'm having trouble using the GLAccount for each category as it says its not a leaf member.

How do cant seem to figure out the syntax for sum all the leaf members of the each OPEX category parent. The leaf members at to many to list out and sometimes can vary.

CONFIG.HIERARCHY = [d/GLACCOUNT].[h/Hierarchcy]
CONFIG.TIME_HIERARCHY = FISCALYEAR

MEMBERSET [d/Date] = [d/Version].[p/START_MONTH] TO [d/Version].[p/END_MONTH] 
MEMBERSET [d/AUDITID] = "INPUT"
MEMBERSET [d/COMPANYCODE] = "HPCL"
MEMBERSET [d/GLACCOUNT] = BASEMEMBER ([d/GLACCOUNT], "DB100Parent","DB200Parent","DB300Parent")

VARIABLEMEMBER #OPEX_VAT OF [d/GLACCOUNT]
//-----------------------------------------------------------------------------------
//Calculation and Data Writing
//-----------------------------------------------------------------------------------
DATA([d/GLACCOUNT]= "VAT_OPEX_UTIL", [d/SEGMENT] = "#", [d/PROFITCENTER] = "#") = RESULTLOOKUP([d/GLACCOUNT].[p/Hierarchy="DB300Parent")

nmahatoo2023_2-1711551839792.png

 

nmahatoo2023_0-1711551164732.pngnmahatoo2023_1-1711551342853.png

 

 

Accepted Solutions (0)

Answers (0)