Calculated Fields
Note: This feature is only available in the Cloud version of Angles for SAP.
Creating Calculated fields enable you to create your own customized fields or columns in your AngleDisplay. You can create your own logic, by applying AgS operators and functions on the fields available in the List Display of an Angle.
Calculated fields can be created from a List Display, inside Angles, Multi-class Angles and Angles containing a jump. Once created, calculated fields can be added to a List Display, Pivots, and Charts. You can apply filters and sorting, and edit and format calculated fields like regular fields. You can also use a calculated field to create another calculated field. Some of the benefits of using Calculated Fields are:
Provides more flexibility to power-users to customize their Angles and Displays.
Reduces the need to export data to other application for calculation needs. When exporting, the data can be better pre-defined before exporting.
Reduction of delta-configuration after export.
Insert Calculated fields
To insert a calculated field, you must select fields and operators from the available list. You can also use values of your choice. The following functions and operators are available in the Calculated fields editor.
Numerical operators | +, -, *, / |
Relational operators | &, =, >>=, <<=, If statements, nested IF-statements |
Logical Operators | AND, OR, NOT, IN, ISBETWEEN |
Numerical Functions | AVG, MAX, MIN, ROUND |
Date Functions | DAY, MONTH, YEAR, CURRENT_TIMESTAMP, DATEDIFF |
String Functions | SUBSTRING, LEFT, LEN, RIGHT, IFNULL |
Like Functions with wildcards | %, _, [ ], ^, - |
Detailed help text has been added for each function and operator, including their definition, usage, syntax, parameter values, and a sample calculation, to clarify their use.
Open the Angle or List Display.
Right-click on the field available in List Display (selected field will be added in the calculated field text editor).
Select Insert calculated field. The calculated field editor opens.
Specify a name for the field.
-
Select appropriate fields and functions to create a calculation in the editor. You can also type in the required values into the editor.
The left window shows the list of fields from your Display. The fields from the start class of the Angle are shown. You can apply filters or use the Search option to find specific fields.
The right window shows the functions and operators. For more information on each operator, select the operator to see the Help information.
If you enter an invalid syntax, the validation message window explains the error.
Click OK.
Save the Display.
After saving the Display, your new Calculated Field is available in your Angle or Display. You can create or add multiple calculated fields in a Display or Angle, as long as the same name is not repeated for a new calculated field.
Edit Calculated fields
Right-click on the calculated field to be edited.
Select Edit field. The calculated field editor opens.
Update the calculation expression as required.
Click Save.
Copy Calculated fields
Right-click on the calculated field to be copied.
Select Copy calculated field. Calculated field will be copied with the name updated to Copy-[calculated field name].
[Optional] Update the name of the new calculated field.
Click Save to save the Display.
Format calculated fields
Right-click on the calculated filed to be formatted.
Select Format field. Use this option to format fields using predefined formats like Value, Text, Amount, Boolean, and so on.
Create a Pivot Display from a calculated field
Right-click on a calculated field.
Select Create Pivot. New pivot display is created.
Create a Chart Display from a calculated field
Right-click on a calculated filed.
Select Create Chart. New chart display is created.
Apply filters on calculated field
User can apply filter using any of the below option
Right-click on the calculated filed and select Add filter.
Use the quick filter option - right-click on the value present in the calculated field column and select Quick Filter.
Select Add filter from the filter panel.
Remove Calculated field from the display
Right-click on the calculated filed to be removed.
Select Remove column.
Click Save Display.
Delete Calculated field
To delete a calculated field, ensure that it is not used in any Angle or Display. If a calculated field is used in an Angle or Display, you must remove it before deleting.
Navigate to Insert Column panel on the left side
In the General filters, select the Calculated field checkbox.The list of Calculated fields present in the angle is shown.
Click on the Delete icon present on the right side on field name. If the delete icon is not visible, resize the field name column to find the delete icon.
Click OK to confirm the action.
Resolve Angle Warnings for Calculated fields
The Angle Warning tool can throw warnings in the following cases:
Invalid calculated field in the list/chart/pivot display
Invalid calculated field dimension
Invalid calculated filter fields
Invalid calculated sorting field
To resolve such warnings in the angle warnings page, select one of the available actions present under Actions drop-down on the right side of the warnings.