Jump to content
We've recently updated our Privacy Statement, available here. ×

GOR Moving Average

Nick Parrillo 2

Recommended Posts



I have a list of many wells that I wish to calculate GOR (Gas Oil Ratio) on and then get the 3 day moving average of said values in a calculated column. The formula I am using keeps generating an error and I cannot figure out why. Any help Here is the formula I have been using and an example of the type of the data.


([Gas/Day] * 1000 / [Oil/Day]) THEN Avg([Value])OVER Intersect([Well],LastPeriods(3,[Days]))

Error is saying not valid expression after "Then"


Thank you

Link to comment
Share on other sites

  • 3 weeks later...

Once you have used "THEN" you cannot use other columns like wells, days etc. THEN is used for post aggregation and use of only [Value] would be allowed or if you are using the custom expression on any visualization then [Axis.X] or [Axis.Color] would also be allowed after then.

You can try to use below expression:

Avg(([Gas/Day] * 1000 / [Oil/Day]))OVER Intersect([Well],LastPeriods(3,[Days]))

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...