Forum Discussion
Polynomial Regression Trendline
Hi all,
Is it possible to generate a polynomial regression trendline of degree two in Power BI similar to Excel using the LINEST function? I'm expecting two slope values and a coefficient as a result to calculate the trendline equation (y = slope1 * x^2 + slope2 * x + coefficient).
Thanks in Advance,
3 Replies
- tharunkumarRTKSuper User
PBIUSER_01
Power BI has introduced LINEST and LINESTX functions. I think you can use these functions to perform polynomial regression as well.
https://dax.guide/linest/If the post helps please give a thumbs up
If it solves your issue, please accept it as the solution to help the other members find it more quickly.
Tharun
- AnonymousNot applicable
Hi PBIUSER_01
It seems that you have gotten a solution. Could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- lbendlinSuper User
LINESTX can only provide linear regression. Here is a useful approach for second order regression
2nd Order Polynomial Regression in Power BI
Note that you need to modify the code to use DIVIDE instead of /