Pramod Dibble Posted January 23, 2019 Share Posted January 23, 2019 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 More sharing options...
Gaia Paolini Posted January 24, 2019 Share Posted January 24, 2019 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 More sharing options...
Pramod Dibble Posted January 24, 2019 Author Share Posted January 24, 2019 That did it. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now