Forum Discussion
Creating a Dynamic Curve from Input Parameters
- 6 years ago
Hi Anonymous,
I have created a measure called hyperbolic_equation in the model, pbix here, sample.pbix
hyperbolic_equation = divide([Initial Production Rate (qi) Value],(POWER((1.0+[Hyperbolic constant (b) Value]*[Nominal decline rate (di) Value]*([time (t) Value])),(1.0/[Hyperbolic constant (b) Value]))))Then i add the measure to the values area and added the following python.
import matplotlib.pyplot as plt dataset.plot(kind='line', x='time (t) Value', y='hyperbolic_equation', color='red') plt.show()Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Hi Anonymous,
Are you able to provide some sample data, what if parameters should work just want to make sure that the results match the equation,
what variables are mapped to parameters and what variables are mapped to values in your data.
Thanks,
Richard
richbenmintz I've not built anything yet. I am unsure how to tackle this as I need to visual to actually plot the equation of the curve.
Can the python visual do that? Can you feed the python visual a what-if parameter?
- richbenmintz6 years agoResident Rockstar
Hi Anonymous,
you can use what if parameters in your Python Visual,
Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!- Anonymous6 years agoNot applicable
Thanks. Do you mind showing a higher resolution picture? I can't see the details
- richbenmintz6 years agoResident Rockstar
Hi Anonymous,
Link to a pbix file, you may have to change the pathing for python, but the file will show you have when you change the param the visual changes
Richard,
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
- Anonymous6 years agoNot applicable
I added some additional parameters to this model to see if this is feasible. It is in line with what I am trying to build but I am unsure how to get it to graph
- richbenmintz6 years agoResident Rockstar
Hi Anonymous,
I have created a measure called hyperbolic_equation in the model, pbix here, sample.pbix
hyperbolic_equation = divide([Initial Production Rate (qi) Value],(POWER((1.0+[Hyperbolic constant (b) Value]*[Nominal decline rate (di) Value]*([time (t) Value])),(1.0/[Hyperbolic constant (b) Value]))))Then i add the measure to the values area and added the following python.
import matplotlib.pyplot as plt dataset.plot(kind='line', x='time (t) Value', y='hyperbolic_equation', color='red') plt.show()Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!