SAP Knowledge Base Article - Public

3040945 - Multiplication of 2 ResultLookups functions does not work in SAP Analytics Cloud (SAC)

Symptom

Calculation not working when using multiplication or division using two resultlookups. It works fine if we use subtraction or addition. In addition it works fine if one resultlookup is replaced with a typed in number/value.

Here is the script:

MEMBERSET [d/Department] = "O"

[d/Year_Month] = "202001"

DATA([d/Account] = "R", [d/Year_Month] = "202001") =

RESULTLOOKUP([d/Account] = "A",[d/Version] = "public.Actual") /

RESULTLOOKUP([d/Account] = "Q",[d/Version] = "public.Actual")

Environment

  • SAP Analytics Cloud (Enterprise) 2021.2.8

Reproducing the Issue

Open story

Run data action

Cause

This is not a bug but working by design.

Resolution

Advanced formulas script calculate for each leaf level data. So, only copy from Actual "A" and  "Q" is to get expected result. But, from time to time the Divide or Multiply calculation is calculated as unexpected result.

Current transaction data is distributed to 24 dimension member of "Department " .

Each result is calculated based on matched leaf member value of "Department ". So, calculated result is populated  based on each leaf member value and aggregated in story grid.

The following modified Advanced formulas script gave expected result:

 

FLOAT @Total_Qty

 

@Total_Qty =

RESULTLOOKUP([d/Account] = "Q",[d/Version] = "public.Actual",[d/Year_Month] = "202001",[d/DepartmentG] = "O"  )

 

DATA([d/Account] = "R", [d/Year_Month] = "202001",[d/Department] = "O") = 
RESULTLOOKUP([d/Account] = "A",[d/Version] = "public.Actual",[d/Year_Month] = "202001",[d/Department] = "O"  )

/ @Total_Qty

See Also

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

Keywords

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, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped , KBA , LOD-ANA-PL-DA , Data Actions , Problem

Product

SAP Analytics Cloud 1.0