Symptom
- Creating a formula that contains LastPeriods results in error if the period is defined dynamically.
- For example: LOOKUP([AMT], [d/Time] = LastPeriods ("Month",[NUM]))
- For such a formula to work, the number must be defined within the formula.
- It doesn't work if it references a measure.
- Even if the measure contains numbers, SAP Analytics Cloud does not accept the formula and provides an error message: "Formula could not be computed: Function LastPeriods expects parameter 2 of type "Number", but receives "Number"; try using the expected parameter type. Try rewriting the formula."
Environment
- SAP Analytics Cloud 2018.18
Reproducing the Issue
- Create a new model.
- Create an account dimension.
- Create three items: AMT, AMT_MEAN, and NUM.
- Define "NUM" with the following formula: MOD(DECFLOAT([d/Time].[p/CALMONTH]),100)
- Define "AMT_MEAN" with the following formula: LOOKUP([AMT],[d/Time] = LastPeriods ("Month",[NUM]))
Cause
- The “LastPeriods“ formula is not designed to work with dynamic inputs.
- Only constant numbers can be used in the formula.
Resolution
This is a feature enhancement and may be considered in a future release
See Also
- How to find User Assistance for SAP Analytics Cloud?
- Ask a question on the SAP Community!
- 2487011 - What information do I need to provide when opening incidents with SAP Analytics Cloud (Hint: Use component LOD-ANA*)
Your feedback is important to help us improve our knowledge base.
Keywords
SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, EPM-ODS, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics , KBA , LOD-ANA , SAP Analytics Cloud (SAC) , LOD-ANA-BI , Business Intelligence Functionality, Analytic Models , LOD-ANA-PL , Planning , LOD-ANA-BR , SAC Boardroom , LOD-ANA-PR , SAC Predictive , Problem