cancel
Showing results for 
Search instead for 
Did you mean: 

Analytic View activation fails because of a Calculated Measure

Former Member
0 Kudos

I'm working with HANA SPS02 here.

Step 1

I have an Analytic View where I have CALDAY among Private Attributes and VALUE in Measures. I add an Attribute View with UCALDAY (whatever it means) and implement a new calculated measure CALCVAL with logic as follows: if( (date("CALDAY") <= date("ATV_SEL_UCALDAY")), "VALUE", 0). It works fine.

Step 2

I added another Attribute View where the key attribute is its own CALDAY field, making a join by that field. Activated the Analytic View failed with the error log as follows:

Error preparing and executing OLAP column view DDL: SAP DBTech JDBC: [2048] (at 15): column store error: <?xml version="1.0" encoding="utf-8"?><createCubeResult version="1.0"><status><message>The scenario XML is not valid</message><errorCode>2112</errorCode></status><details><errors><detail><element>CalculationNode (finalAggregation) -> attributes -> calculatedAttribute (CALCVAL) -> expression</element><code>46</code><message>Attribute 'CALDAY' is missing in node finalAggregation</message></detail></errors><warnings><detail><element>cubeSchema</element><code>46</code><message>Default language not set. Use 'en'</message></detail></warnings></details></createCubeResult>
 Exception: class com.sap.db.jdbc.exceptions.JDBCDriverException
com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:284)
com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:149)
com.sap.db.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:98)
com.sap.db.jdbc.ConnectionSapDB.throwSQLError(ConnectionSapDB.java:1124)
com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:774)
com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:639)
com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:433)
com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:309)
com.sap.db.jdbc.trace.PreparedStatement.execute(PreparedStatement.java:153)
com.sap.ndb.studio.sdk.resource.deployment.bi.DeploymentExecutor.getAndExecuteActivationDDl(Unknown Source)
com.sap.ndb.studio.bi.deployment.DeploymentJob.activateObjects(Unknown Source)
com.sap.ndb.studio.bi.deployment.DeploymentJob.run(Unknown Source)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Step 3

If I delete that CALCVAR measure, Analytic View can be activated just fine.

No hints in OSS Notes so far. Any ideas what went wrong?

Accepted Solutions (0)

Answers (1)

Answers (1)

tomas-krojzl
Active Contributor
0 Kudos

Hello,

it is extremely hard from such description to figure out what is the problem...

You might need to paste the screenshots so that we can take a look...

Just one hint - make sure that you do not take attribute and use it as calculated measure or vice versa - this will definitely lead to error.

Tomas

Former Member
0 Kudos

I finally decided not to use any calculated measures at all in the Analytic View, leaving that to the Calculation View.