Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated column on Cube Analytical CDS

Alvaro_AH
Explorer
0 Kudos

Hi Gurus, I'm facing an issue which I'm not able to fix.

I have a CDS labeled as an analytical cube:

And all the measures included in the cube are aggregated in the form of addition:

Now, I needed to add some new calculated columns, being a division between two aggregated columns. I tried using the aggregation in the form of formula, so the calculated columns are calculated after the measures have been aggregated. That sounded perfect for my requirement.

However, this is not working at all, because when trying to activate I'm having an error stating:
Element contains unsupported aggregation #FORMULA [Analytics].

So, I'm wondering how to achieve this. I just need to run calculations after the aggregations, but still no luck on this.

Have you ever faced same situation? Any tip?

Thanks in advance.

1 ACCEPTED SOLUTION

Alvaro_AH
Explorer
0 Kudos
@Aggregation.default: #FORMULA
@AnalyticsDetails.query.formula: 'NDIV0( Operand1 / Operand2 ) * 100'
@AnalyticsDetails.query.decimals: 2
1 as Result,

Solved! By making use of formulas within the annotations in the Analytical query on top of the Cube. Note there is a need to "declare" a column for the result, which will be filled with the formula result.

1 REPLY 1

Alvaro_AH
Explorer
0 Kudos
@Aggregation.default: #FORMULA
@AnalyticsDetails.query.formula: 'NDIV0( Operand1 / Operand2 ) * 100'
@AnalyticsDetails.query.decimals: 2
1 as Result,

Solved! By making use of formulas within the annotations in the Analytical query on top of the Cube. Note there is a need to "declare" a column for the result, which will be filled with the formula result.