Jump to content

Well Cumulative - Wrong value sometimes, but not always using Sum OVER Intersect All Previous


W Boyers

Recommended Posts

Hi there,

I have a small sample table of data of 3 wells for oil production and I am trying to correctly calculate the cumulative amount produced over time which I've done on other data, never encountering this issue.

Problem:

Selecting a single well produces the correct rate (black line) and cumulative (blue line) in first image below.

But, when I select all the wells (to total the field), the rate still plots correctly, but the cumulative does not plot correctly. You can see the "dip" in the blue line cumulative for all wells summed together. Since the cumulative cannot go down, this dip is the problem that I'm encountering on some data, but not all.

Any help is greatly appreciated! Data and plots are in attached .dxp. or the table of data is attached in .txt file.

From what I can tell the issue comes from the fact that summing over AllPrevious([Date]) really sumsgroups of the same date and not really a running cumulative sum of all values over all previous dates.

Columns in the attached project:

Original = Well Name, Date, Rate (bbl/d), Month Total (=rate x 30.5 for testing),

Calculated Column = Cumulative Oil usingSum([Month Total]) OVER (Intersect([Well Name],AllPrevious([Date]))) / 1000000

Link to comment
Share on other sites

  • 5 weeks later...

You can use this expression directly in your line chart without calculated column so cumulative sum would be irrespective of wells

Sum([Month Total]) OVER (Intersect(AllPrevious([Date]))) / 1000000Now when you filter on one or more wells you will always get data summed up for all previous dates.

In your expression, previous dates were only retrieved for each wells, which might not be correct when no filter is applied.

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