Jump to content

SOLVED: Error with OVER


Pramod Dibble

Recommended Posts

I am trying to calculate a 3-month moving average using the OVER expression, and the LastPeriods method. My value is expressed as follows: (Sum(If([TYPE]=2,[AMOUNT],NULL))/ Sum(If([TYPE]=3,[AMOUNT],NULL))) OVER LastPeriods(3,[Axis.X]))/3 I am getting an error saying that the expression is not valid starting with OVER. The error does not give me any more information beyond that. Any idea what the problem could be
Link to comment
Share on other sites

Hi

removing the outer parentheses like this worked:

Sum(If([TYPE]=2,[AMOUNT],NULL)) / Sum(If([TYPE]=3,[AMOUNT],NULL))

OVER (LastPeriods(3,[Axis.X])) / 3

unfortunatelywithout having an example with data, and knowing what the desired result is, it is not possible to know whether the resulting calculation is correct

Gaia

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...