cancel
Showing results for 
Search instead for 
Did you mean: 

Use Calculated Measure and Calculated Dimension in Report Management

edwiromero_s
Product and Topic Expert
Product and Topic Expert
0 Kudos
227

Experts, 

Have you used the Calculated measure and Calculated dimensions in PaPM OP/PCE? Any example? We have been trying that but there's no documentation and we haven't got any results. 

edwiromero_s_0-1724158739906.png

If anyone has an example I would appreciate. 

View Entire Topic
C5315627
Product and Topic Expert
Product and Topic Expert

Hi Edwin

from your example, I would assume that you would like to assign 0 to these measures. Consequently, the syntax should be like this:

scope['Other'] = 0;

You can also refer to other fields in your assignment. In such cases, you would just have to add a "scope" in front of the field name you would like to refer to.

For example:

scope['Other'] = scope.FieldA;

Even If-conditions are possible. Hence, you could define a logic like:

scope['Other'] = scope.FieldA === 'ABC' ? 'Yes' : 'XYZ';

You can also refer to the reports created in the official sample contents. For example in SXD/007 - Corporate Sustainability Management, such calculated measures with simple assignments are used a lot.

The formula you provide in the calcualted measure/dimension will go through all records included in your query. In the example provide above this would mean that, if FieldA has the value 'ABC', you will assign the string 'Yes' to your new dimension called Other. If the value in FieldA is not 'ABC', you will assign 'XYZ' to your new dimension called Other.

I hope this clarifies some of your doubts.

 

Best regards

Benedikt