Symptom
- In Custom analytical query negative amount is displayed without a negative sign when used as a dimension in a custom analytical query
- Although the calculation is defined to display a negative value (when the difference between field is negative), the custom analytical query report incorrectly shows a positive number
Environment
SAP S/4HANA Cloud Public Edition
Cause
Customer Data Browser application or the preview functionality from Custom CDS view are displaying raw data without semantic meaning and without aggregations.
However, custom analytical queries preview framework is based on the annotations that are defined in the analytical CDS view.
If the field is not defined as a measure, it will be considered a dimension and the properties of the numeric field won't be taken into account.
Resolution
If user decided to use any "field" as a key figure in the Custom Analytical Query, the aggregation for "field" needs to be defined in the corresponding Custom CDS View.
Open Custom CDS View in the Edit Mode, switch to "Field Properties" and set the aggregation (Element Properties | SAP Help Portal).
See Also
Element Properties | SAP Help Portal
3201919 - Custom CDS Views – Frequently Asked Questions - SAP for Me
Analytical Scenarios: Dimensions and Cubes | SAP Help Portal
Keywords
Element Properties, Analytical Scenarios: Dimensions and Cubes, Custom analytical query, negative amount, negative sign when used as a dimension, custom analytical query report incorrectly shows a positive number, S4_PC, S4_1C , KBA , BC-SRV-APS-EXT-AQD , Fiori based Query Designer , Problem