Jump to content

Calculating the average TVD once a wellbore hits 80 degrees inclination to TD


John Brand

Recommended Posts

I'm trying to calculate the average TVD once a wellbore hits 80 degrees inclinationall the way to total depth (maximum measured depth) for eachwell. In other words, calculate the average TVDfor the rows in bold textover each well ID.

 

 

 

Measured Depth

Inclination

True Vertical Depth

Well ID

 

 

 

 

Measured Depth

Inclination

True Vertical Depth

Well ID

 

 

2000

40

1600

A

 

 

3000

60

1800

A

 

 

4000

80

2000

A

 

 

5000

90

2100

A

 

 

6000

75

2200

A

 

 

7000

75

2400

A

 

 

1000

20

800

B

 

 

2000

40

1400

B

 

 

3000

60

1700

B

 

 

4000

80

2000

B

 

 

5000

90

2200

B

 

 

6000

78

2100

B

Link to comment
Share on other sites

Let's first check for each well if you reached at least 80. I do this by checking the max. value of all the previous rows. Only if this condition is met I calculate the avg. TVD per well. Otherwise it returns NULL.

If(Max([inclination]) OVER Intersect([Well ID],AllPrevious([Measured Depth])) >= 80,Avg([True Vertical Depth]) OVER [Well ID])

PS:It's an advantage that your data table is already in the right order. Otherwise you would have to use a rank function to get it into the right order and to get the AllPrevious() work correctly.

Link to comment
Share on other sites

  • 2 weeks later...

So my actual dataset is not sorted by Well ID & MD like my sample data is.  I did calculate a new column ranking MD over Well ID.  Where would this ranked MD column be incorporated into the expression that you provided  Would I replace [Measured Depth] with [Ranked Measured Depth]

 

Thank you.

Link to comment
Share on other sites

Sorry, my comment regarding the order/rank and AllPrevious() function was incorrect in this case. You don't have to worry about that. AllPrevious() will work fine with your [Measured Depth] column as you only drill down deeper (1000,2000,3000,...). Otherwise you would replace it with your anked column, yes.
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...