Implementating a CAGR calculation in cube view

Sergey
Contributor III

Dear community,

I am trying to implement a CAGR calculation as shown in this link : https://blog.hubspot.com/marketing/cagr-formula-excel

I have 3 years of data in a cube view, hence my calc should be : (end value / beg value) ^ (1/3) - 1

 

However, OneStrea does not recognize this "^" which is a pity. What are the alternative to define an exponential value in the cube view ?

What I currently have :

GetDataCell( (CVC(end_value) / CVC(beg_value) ) ^ (1-3) -1 ):NAME(CAGR)

 

Many thanks for your input on this

2 REPLIES 2

ChrisLoran
Valued Contributor

Could this not be done using a DynamicCalc member?
DynamicCalc just retrieves the corresponding end_value & beg_value using GetDataCell, into two numeric variables.
And then do the math (where you have the Math.Pow function : https://learn.microsoft.com/en-us/dotnet/api/system.math.pow?view=net-7.0 )

Sergey
Contributor III

Hi Chris,

I understand the logic, but this indicator will be applied to several indicators, scenario & years, so I don't clearly see how we can use a dynamicCalc member in this situation.

If I use a business rule in a cube view, is there a way to reference previous columns of a given cube view ?

Regards,

Cyril