# BPC 10/10.1 NW with HANA MDX / Member Formulas using property values

Hi everyone,

I'm trying to calculate a simple annualized calculation with the following formula in BPC10.1 on HANA with HANA MDX turned ON, this used to work with HANA MDX turned OFF.

([ACCOUNT].[PARENTH1].[MF_SALES_ANN])*(-12/([TIME].CurrentMember.Properties("BASE_PERIOD")))

I tried following the workaround provided in this discussion: BPC 10 NW Member formula using property value but it doesn't seem to work for me.

Is there an alternative for a member formula using properties when you have HANA MDX turned on? I get an "Internal Error" in the member formula editor if I try to use STRLEN and if I check the query in HANA Studio I get the following message:

([ACCOUNT].[PARENTH1].[MF_SALES_ANN])*(-12/(STRLEN([TIME].CurrentMember.Properties("BASE_PERIOD")))

"Could not execute 'MDX WITH MEMBER [Measures].[YTD] AS ...' in 4 ms 521 µs .

SAP DBTech JDBC: [256]: sql processing error: Error occurred while executing a MDX statement. The error message is: The usage of STRLEN in the current context is not supported"

([ACCOUNT].[PARENTH1].[MF_SALES_ANN])*(-12/(STRTOVALUE([TIME].CurrentMember.Properties("BASE_PERIOD")))

Now, if I try using STRTOVALUE in HANA Studio by modifying the query that the EPM Add-in generates, it works but the BPC formula editor gives me the same "Internal Error" while trying to validate the formula.

If I use [TIME].CurrentMember.Properties("BASE_PERIOD") I get the following error because of the different types "string" & "integer" in an arithmetical operation:

Could not execute 'MDX WITH MEMBER [Measures].[YTD] AS ...' in 119 ms 136 µs .

SAP DBTech JDBC: [256]: sql processing error: Error occurred while executing a MDX statement. The error message is: Inconsistent calculation model; $message$=Inconsistent calculation model;calculationNode (N_0141_AGGR) -> attributes -> attribute (H68241575_CM709_/B28/S_SDATA) -> expression:Expression is not valid: Evaluator: type error in expression evaluator;fixed12_13.7 fixed_12(divide(double times(double plus(double double(fixed12_13.7 minus(fixed12_13.7 "R_H68241575_N806__/B28/S_SDATA")), double times(double double(fixed12_13.7 "R_H68241575_N818__/B28/S_SDATA"), double plus(double double(int '1'), double divide(double double(fixed12_13.7 "R_H68241575_N807__/B28/S_SDATA"), double double(fixed12_13.7 "R_H68241575_N803__/B28/S_SDATA"))))), double double(int '1200')), double double([here]times(string "#_PL_682425590/CPMB/IDP5PJT", double "ALIAS_#_CM_68242559_-797741121_68241575_-301345112_/B28/S_SDATA"))))

I know that I could use a very long IIF statement with every single conditional (for each month) but I'm looking for a more "elegant" solution.

Thanks,

##### Vadim Kalinin replied

I can't test with HANA, but:

"If I use [TIME].CurrentMember.Properties("BASE_PERIOD") I get the following error because of the different types "string" & "integer" in an arithmetical operation" - strange, BASE_PERIOD is numeric! Can you check Data Type in RSA1?

Also please read at the end of the page: Library of MDX Functions - SAP Business Planning and Consolidation, version for SAP NetWeaver - SAP Library

Generate the list of MDX functions using BAPI_MDPROVIDER_GET_FUNCTIONS via transaction SE37. Do you see STRLEN and STRTOVALUE?

What is your SP of BPC 10.1?

Vadim