You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

MDX Formula with Avg function is not working in Groovy Business Rule in PCMCS ASO cube

Accepted answer
75
Views
9
Comments

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]})'

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!