- 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."
- 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]))
- The “LastPeriods“ formula is not designed to work with dynamic inputs.
- Only constant numbers can be used in the formula.
This is a feature enhancement and may be considered in a future release
- 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.
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 , LOD-ANA-BI , SAP Analytics Cloud - Business Intelligence (BOC) , LOD-ANA-BR , SAP Analytics Cloud - Digital Boardroom , LOD-ANA-PL , SAP Analytics Cloud – Planning (BOC) , LOD-ANA-PR , SAP Analytics Cloud – Predictive (BOC) , Problem