Forum Discussion
DAX Polynomial Regression Calculation Issue
- 5 years ago
I think the main problem here is this: COUNTX(VALUES(Table1[date]),Table1[date])
This is evaluated within the local filter context and returns 1 for each row corresponding to a single date.
Try this instead: COUNTROWS ( ALLSELECTED ( Table1[date] ) )
Found a solution for a 5x5 matrix using Chio method of expansion and Cramer's Rule, parsing the solution vector into a series of matrices, to calculate determinants divided by the original determinant to solve for the polynomial regression coefficients...
I have a matrix with 2 columns from which i want to run a polynomial regression to the fourth degree to fit a line on data. The fourth degree is to smooth the data basically looking at daily data with a smoothing effect over a four week period. I can't seem to convert the equations of the DAX code above to give me the results of a fourth degree and struggling to convert your excel spreadsheet to those equations. Any help would be greatly appreciated.