SAP Knowledge Base Article - Public

2960824 - DATEDIFF function fails in SAP Analytics Cloud for Planning (SAC)


You use the DATEDIFF function to calculate the date difference of 2 dimensions in SAP Analytics Cloud for Planning (SAC).

When you run this data action, it fails.

In the system trace, the following error is documented:

  • component:, resource. planSeq
  • message: Execution of EPM command failed. The error has been logged. ExecutionException@/sap/fpa/services/planSeq/executor/ExecutionException.xsjslib:10 ExecutionManager.prototype._checkResult@/sap/fpa/services/planSeq/executor/ExecutionManager.xsjslib:1302 ExecutionManager.prototype._executeEPMModelCommand@/sap/fpa/services/planSeq/executor/ExecutionManager.xsjslib:1597 ExecutionManager.executeBatch/<@/sap/fpa/services/planSeq/executor/ExecutionManager.xsjslib:1532 ExecutionManager.executeBatch@/sap/fpa/services/planSeq/executor/ExecutionManager.xsjslib:1532 executeBatchAsync@/sap/fpa/services/planSeq/executor/ExecutionManager.xsjslib:714 JobExecutor.prototype._runJobFuncWithRetry@/sap/fpa/services/jqm/core/JobExecutor.xsjslib:124 JobExecutor.prototype.runJob@/sap/fpa/services/jqm/core/JobExecutor.xsjslib:42 JobExecutionController.prototype._launchJobExecutor@/sap/fpa/services/jqm/core/JobExecutionController.xsjslib:344 JobExecutionController.prototype._handleChainJob@/sap/fpa/services/jqm/core/JobExecutionController.xsjslib:71 JobExecutionController.prototype.handleJob@/sap/fpa/services/jqm/core/JobExecutionController.xsjslib:44 callJobExecutionController@/sap/fpa/services/jqm/JobExecutionController.xsjs:17

If you use DATEDIFF([d/<dimension A>], “<fixed date>”, "DAY", "CalendarDiff") or DATEDIFF(“<fixed date>”, [d/<dimension B>], "DAY", "CalendarDiff"), it suddenly works.


  • SAP Analytics Cloud (Enterprise) 2020.18.0
  • SAP Analytics Cloud (Enterprise) 2020.17.2


To calculate Datediff(), system retrieves dimension member scope of the 2 dimensions.

There are not Memberset filter for the 2 dimensions and system retrieves all leaf members of both dimensions, which are quite a lot.

Then system combines all case of leaf members of 2 dimensions (leaf members of dimension A * leaf members of dimension B), which exceeds the maximum numbers the system can calculate at once.


There are internal limitations to calculate at once which depends on system resource and number of fact data.

Based on previous experience, over 10 ~ 20 million calculation combination leads to technical errors.

To avoid technical error, please reduce calculation scope using Memberset for the 2 dimensions.

See Also

Your feedback is important to help us improve our knowledge base.


SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Sac, Acquisition, Model, Connect, Story, Tenant, Import, Failed, Using, Working , KBA , LOD-ANA-PL-AF , Advanced Formulas , Problem


SAP Analytics Cloud 1.0