Cumulative sum avoiding "0" data

62 Views Asked by At

I am trying create a calculated cumulative production column and trying to avoid zeros so the line on cum-time plot do not appear flat and is smoother. For example cum oil entrees for month 1 and 2 are similar which I would like it not to be and move everything back to month 1 ie 7.08,24.91,41.32 etcmove the line back to time 0 and avoid early flat time Data set

I am expecting the cum production numbers to be incremental and avoid null and zero values

1

There are 1 best solutions below

0
NHW On

You need to calculate the producing months separately then use that column as the x-axis in the cumulative production plot

I usually do an intermediate calculated column on the table to test if there is production in the month

[hasProduction] = if([Liquid] > 0, 1, 0)

then you can create another calculated column to sum up the hasProduction column and get a ProducingMonth column

[ProducingMonth] = If([HasProduction] = 1, Sum([hasProduction]) over AllPrevious([PROD_DATE]), null)

use ProducingMonth as the x-axis in the plot which will be null for any months with no production and should give you a smooth cumulative curve. I used 0 as the threshold but you can pick a larger number if you also want to exclude 'small' production months as well.