Posts

SAP Analytics Cloud - Data Action example

Image
Business Scenario: Calculate the accumulated monthly values in a new measure Though model calculations were defined using the ITERATE function to calculate the accumulative sum of monthly values, the on-the-fly calculations were generating incorrect values in the story when a filter was applied at monthly level (Ex. a story filter on Dec 2022 would show Total hours as 81.24 instead of 556.69)  Components in a Data Action explained: Scope: MEMBERSET command is used to define the scope of the Data Action Ex. MEMBERSET [d/MEASURES] = ("CONTRACT_HRS_CONSUMED") In the example, the scope of the calculation is restricted to the measure CONTRACT_HRS_CONSUMED Lookup: RESULTLOOKUP command returns the values based on the parameters  Ex.   RESULTLOOKUP([d/TIME] = PREVIOUS(1, "MONTH", [d/TIME])) Here, the RESULTLOOKUP command fetches the previous month values    Writing results: DATA command is used to write data into the SAC model Ex. DATA([d/MEASURES] = "CONTRACT_HRS_PR...