Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello guys! hope you're doing all well.
Here is a tricky one (at least for my modest knowledge):
I have a set of items (oil-producing wells - Well), and each one of them has an oil production history (Oil produced - qoil, in each month - monthly Date). So my data looks like this:
Well Date qoil
ME-0001 01/08/2020 1.5
ME-0001 01/09/2020 1.5
ME-0001 01/10/2020 1.4
ME-5000 01/08/2020 4.4
ME-5000 01/09/2020 4.0
ME-5000 01/10/2020 3.7
ME-3251 01/08/2020 0.2
ME-3251 01/09/2020 0.2
ME-3251 01/10/2020 0.2
(note that this is just a sample, being the real data thousands of wells and all dates from the 1950s to the present date).
The evolution of these oil production curves usually follows an exponential form, such as the following:
Mathematically speaking, this curve is modeled as:
if in the Date = t0 --> qoil0 = Qo0
then in the next Date =t1 --> qoil1 = Qo0 x Exp (-DNA/12)
where DNA is the Annual Nominal Decline rate, which in the equation is divided by 12 because DNA is Annual, and the period is in months.
My data is obtained from measurements in an Oil Field, so I have a production history curve for each Well, and it shows a certain noisy behavior due to inherent methods of measurements (and many other reasons). As it is a historical curve, all the dates are Past Dates (they begin around 1950 and they continue to being added to my Data set every month), being the latest available date equal to October-2020. Based on these data points, I want to calculate the DNA value for each well, by looking at the latest 24 dates (2 years back).
Basically, the method for estimating DNA is:
I have managed to calculate this DNA value for each well, but only using the latest available Date as TargetDate (so I have the Nominal Decline rate of the latest 24 months). I have done that by filtering my auxiliary calculated columns using MAX(data[Date]) function, as in the following picture:
Note that for a given Well, all the rows have the same numeric value for the calculated DNA column, that is because, for that particular well, all the calculated formulas use the same TargetDate as a starting point (which is Maximum date, or latest historical date)
In the following link is the *.pbix containing what I have done already.
Here is my request:
The aim is to be able to know at any time in history which was the Decline Rate of a particular well. I need to use DAX (not Power Query) to solve it.
Your help will be much appreciated. Thanks in advance for your kind support, I've been struggling with this problem for a couple of weeks so far. Best regards!
@amitchandak, in the following link you can find:
There is no sensitive data as all the data contained in these files is not real.
Thank you so much for your interest.
Regards,
Hi Ibendlin, thank you for your response.
In the aim of simplifying the problem, I showed an example of a Well having a near-perfect exponential production history, but this is far from being the common case: Producing wells often show very complex changes of trends in their production, sometimes increasing and sometimes decreasing. The causes of these changes are many, such as:
The following image is real data of a well, where the variability of DNA can be observed.
Then, the entire production history of a well can not be characterized by a single DNA value. Instead, DNAs are estimated all across the life of a producing well, because is a measure of the well is performing in comparison with expectations, or other similar wells.
The problem I'm trying to solve is related to how to use each row date as a parameter, instead of using MAX(data[Date]).
Thanks again for your help.
Best regards,
Marcelo
@MarceloSaez Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
That sounds overly complex. Why not do this entirely in the logarithmic world? All you need to know is the logarithmic slope and the current value. Everything else can be computed, no?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
98 | |
79 | |
74 | |
66 |
User | Count |
---|---|
136 | |
109 | |
104 | |
82 | |
73 |