cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Advance formula not working for division operation

Victorcardona
Explorer
0 Kudos

Hello SAP experts,

I am currently working on the following advance data action:

as you can see, I am trying to make a division in the line 9, but when I run the data action on the story i get the following result:

The data action is returning a null value, however it shouldn't be the case because the meausure I am doing the division with have data.

Look what happens if I change the operator / (division) for the operator + (sum)

On this case the data action returns the correct sum.

Could you please help me to understand why the data action is not working for the division operation? Thank you.

William_Yu
Product and Topic Expert
Product and Topic Expert
0 Kudos

I assume it's a problem of the data rather than the calculation, try to drill down to the bottom of the data on every dimension in the model. Data action always works on the leaf nodes of all dimensions .

Accepted Solutions (0)

Answers (1)

Answers (1)

N1kh1l
Active Contributor
0 Kudos

victorm.cardona

victorm.cardonaMultiplication and Division are tricky in SAC and behave differently than Addition and Subtraction. Both Multiplication and Division works on join between 2 resultlookups on every dimension. So the trick to get it work is to specify all dimensions within RESULTLOOKUP which differ in value between the two resultlookups(). You can only omit those dimension which have common values. Also report view can be deceiving as it does not show all dimensions. Try checking how the records being multiplied are stored in terms of all dimension either in model or formula trace. So if you are multiplying A*B, see the dimensionality of A and B and then any dimension which differs in value between A and B needs to specified in RESULTLOOKUP. Currently you are only specifying version and the measure so this will only work if both records have same master data values for all other dimension in the model.

Br.

Nikhil