cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Aggregation on Data Action

SANA11
Participant
0 Likes
4,675

Hello all, 

Can anyone help me resolve the issue I'm facing? I need to calculate the value of Revenue NA [DRV0060] by multiplying the lookup price and units, but the resulting values are incorrect. I'm implementing this using scripting in a data action, and the values appearing are significantly lower than the expected ones, which are simply obtained by multiplying the two factors. I suspect the issue is due to improper aggregation at the hierarchical level. 

Script I am using 
DATA([d/ACCOUNT] = "DRV0060") =
RESULTLOOKUP([d/ACCOUNT] = "DRV0055") * RESULTLOOKUP([d/ACCOUNT] = "DRV0020")

below are the incorrect values 

SANA11_0-1741333749340.png

SANA11_1-1741334467866.png

 

 

View Entire Topic
ihar_stankevich
Explorer
0 Likes

Hi, 

RESULTLOOKUP()*RESULTLOOKUP() - it's multiplication of the same booked combinations from both accounts. 

Add context (all dimensions) to both of your Accounts (DRV0055 and DRV0020). Only identical combinations from these accounts will be multiplied.

Multiplication is happening on the row level.

In your case, you could define your formula (multiplication) in Account dimension in Formula field. In this case in report - SAC aggregate all dimensions and after will apply multiplication. 

More info you could find here https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/ce7b148eeac942f6ad1d0...

Also aggregated result could be achieved through calculated measure. The question what is the end goal. In these both options calculation will be on fly

Best regards, 

SANA11
Participant
0 Likes
holger.handel william.yu derekl.johnson can you please assist in this manner whether account dimension formula field is the only option or we can do it with data actions scripting as well