MDX Formula with Avg function is not working in Groovy Business Rule in PCMCS ASO cube
Hi,
I am creating Groovy Business Rule to calculate Average of an Account from Jan to Current Month and assign this value to other account.
([ACCT_AVG]) := (Avg(({[Period].[Jan]:[Period].CurrentMember})),[Account].[ACCT_ABC]);
Above formula is working fine in outline member formula but in Groovy Business Rule it is not working.
Validation is successful but when I run rule the it gives error "A method called by script failed on line 6, with error: The expression is invalid.
Can you please help me out fixing this issue.
Below is code snippet.
CustomCalcParameters calcParameters = new CustomCalcParameters()
calcParameters.pov = 'Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Leaves([YearTotal]),{[FY23]}),{[Actual]}),{[Final]}),{[PCM_Input]}),{[PCM_NoRule]}),{[SRC_Input]}),{[IND_ABC]}),{[DEPT_ABC]}),{[PROD_ABC]}),{[GEOG_ABC]}),{[COMP_ABC]}),{[PLAT_ABC]}),{[BSEG_ABC]}),{[NoFuture_1]}),{[NoFuture_2]})'