Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Using functions in MDX logic script

How can i use  MDX functions like ABS, SIGN etc. in logic scripts?

Actually, i would like to save always positive values for example for revenues.

The script could be like that:






But this gives a validation error "RefferenceError: ABS is not defined".

Maybe there is some other way to save the absolute value or to change sign in case the value is negative?

Former Member

Hi Natalija,

The only conditional operator supported is ternary operator:

EXPRESSION or FACTOR=LogicalTest ? ExpressionIfTrue : ExpressionIfFalse



If current value greater then zero then write current value multiplied by 2, else - write zero.

Fob BPC NW 10 with ABAP calculation engine nested ternary operator is not supported, with JAVASCRIPT calculation engine - nested is supported.

B.R. Vadim

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question