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:
*REC(EXPRESSION = ABS(%VALUE%))
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?
Vadim Kalinin replied
The only conditional operator supported is ternary operator:
EXPRESSION or FACTOR=LogicalTest ? ExpressionIfTrue : ExpressionIfFalse
*REC(EXPRESSION=%VALUE%>0 ? %VALUE%*2 : 0)
If current value greater then zero then write current value multiplied by 2, else - write zero.