Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX Polynomial Regression Calculation Issue

I am attempting to implement a 2nd order polynomial regression to fit some data. It appears that I can calculate the coefficients for the regression equation correctly, but I just cannot figure out h...
  • AlexisOlson's avatar
    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] ) )