on 09-01-2020 4:47 PM
Hi experts,
I need to create a custom measure in order to reverse sign of account based on the value of a dimension, in order to do so i created a property named "SIGN" in my dimension with value 0 or 1.
This is my custom measure's code
'IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("SIGN")="1",-[MEASURES].[/CPMB/SDATA], IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("SIGN")="0",[MEASURES].[/CPMB/SDATA]),[MEASURES].[/CPMB/SDATA])))';
But it's not working, it gives me an MDX: internal error
I think that my code is not correct
Do you guys have an idea what it might be ?
Thank you
You have also a syntax error:
="0",[/CPMB/SDATA]),
Instead of [/CPMB/SDATA] have to be [MEASURES].[/CPMB/SDATA]
Also:
SOLVE_ORDER=3
At the end
You have to be VERY accurate with measure formulas
Check brackets also.
Correct will be:
'IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("/CPMB/VEPPDTC")="1",-[MEASURES].[/CPMB/SDATA],IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("/CPMB/VEPPDTC")="0",[MEASURES].[/CPMB/SDATA],[MEASURES].[/CPMB/SDATA]))';SOLVE_ORDER=3
1 - "-"
0 - "+"
Other value - "+"
For clear picture:
'IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("/CPMB/VEPPDTC")="1",
-[MEASURES].[/CPMB/SDATA],
IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("/CPMB/VEPPDTC")="0",
[MEASURES].[/CPMB/SDATA],
[MEASURES].[/CPMB/SDATA]))';SOLVE_ORDER=3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and where i can find the technical name ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the formular:
CURRENTMEMBER.PROPERTIES("SIGN")
Instead of SIGN you have to use technical name of the property!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've changed the name of the property to technical key but it's still not working, the error is : MDX Statement error: internal error
Here is the code:
'IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("/CPMB/VEPPDTC")="1",-[MEASURES].[/CPMB/SDATA], IIF([%C_CODE%].CURRENTMEMBER.PROPERTIES("/CPMB/VEPPDTC")="0",[/CPMB/SDATA]), [MEASURES].[/CPMB/SDATA]))';
User | Count |
---|---|
16 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.