CDS Query: Parameter used in Formula (OLAP Formula Variable)
ABAP Perspective in Hana Studio
Definition of CDS View
You can see that there are two formulas which use the parameter p_seats. As discussed in Simple CDS View Query with formulas and restrictions, the formula which uses the annotation AnalyticsDetails.query.formula is only interpreted by the Analytic Engine. Hence, when the DataPreview is used in the Hana Studio the corresponding column only contains 1.
Hana Studio: DataPreview
When the query is executed in RSRT, all key figures deliver the correct values:
Please note, the the formulas (plus/minus 5) are calculated after aggregation(e.g. 9.975 + 5 = 9.980). This is the default of the Analytic Engine, see Formulas and Calculated Key Figures for more details.