Forum Discussion
Find polynomial equation
Hi all,
The latest update of PowerBi supports the linest function.
However, I am trying to use it in the same way, as in MS Excel, but it is now working.
In particular, I want to find the polynomial function that connects two columns of a table.
Further to the above i tried using the follow functions (in measures) to find a, b... etc of the polynomial equation
| y = a*x4 + b*x3 + c*x2 + d*x + e |
a=INDEX(LINEST(known_y,known_x^{1,2,3,4}),1)
b=INDEX(LINEST(known_y,known_x^{1,2,3,4}),1,2)
....
Since the above measures are not working, I would appreciate if you could advise how to resolve it.
Thank you.
5 Replies
- patsa7New Member
Thank you for your replies. I understand that there is no way to find a polynomial equation of 4th grade through MS PowerBi , in as similar manner as in MS Excel.
- ronrsnfld
Super User
Just saw this question as I was looking for a method to do this in M.
But do do this in DAX is relatively easy as LINESTX accepts multiple arguments for "X"
Starting with a table:
Add columns representing successive powers of X:
Example for X^2: X^2 = POWER([X],2)
Then use this to create a new table with the relevant slopes (and other coefficients)
TableName = = LINESTX(Example4th,[Y],[X],[X^2],[X^3],[X^4])This results in:
as well as other coefficients.
Hope this helps, although late.
- technologyLMMFrequent Visitor
Thank you for your reply Padycosmos . The mentioned guide describes how to find the polynomial of 1st grade and not of 4th grade, as i would like.
y = a*x^4 + b*x^3 + c*x^2 + d*x + e Could you please give me an example on how to use this function to find a, b,c ,d and e of the above polynomial equation?
- Padycosmos
Solution Sage
Sorry, I have never tried this before. Shall get back after trying it out