Forum Discussion
Creating a Dynamic Curve from Input Parameters
I am trying to build a dashboard tool that allows some of our engineers to adjust a set of parameters that are used in defining the equation of a curve.
What is the best approach for doing this? Does the Python or R visual allow you to read in table inputs like a series?
In the example I am trying to build, would follow the following equation for a hyperbolic curve.
hyperbolic_curve(t, qi, b, di)
t = time
qi = initial rate
b = hyperbolic constant
di = nominal decline rate
Output = qi/((1.0+b*di*t)**(1.0/b))
Thanks
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!
10 Replies
- Pragati11Super User
Hi Anonymous ,
Try checking what-if parameters in Power BI:
https://radacad.com/power-bi-what-if-parameters
Thanks,
Pragati
- vanessafvgCommunity Championwhat are you expecting, can you demonstrate what you want to end up with.
maybe you can provide some dummy data?- AnonymousNot applicable
I was thinking the report page would have several parameter buttons and sliders that give the engineers the ability to set different inputs and those changes automatically changing the visualization of the curve.
- richbenmintzResident Rockstar
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