Forum Discussion
LINESTX return 0 for slope
Strange situation. Using the XXL BI Dax measure for Linerar regression.
X= are dates
Y = numbers
The table is filtered with a slicer. Looking at the returned columns for different categories, I get a variety of intercept values., but every slope is 0.
Thoughts?
2 Replies
- AnonymousNot applicable
Hi Anonymous ,
There could be several possible reasons for this issue, such as:
- The data points in your table are not linearly related, meaning that there is no correlation between the x and y values. This could happen if the data is random, constant, or has outliers that distort the trend.
- The data points in your table have a very small variation in the x or y values, meaning that the slope is very close to zero but not exactly zero. Adjust the format of your measure to display more decimal places.
You can refer to the following posts that may be helpful to you:
Implementing linear regression in Power BI - SQLBI
powerbi - Power BI Linear Regression DAX measure always returns 0 for slope - Stack Overflow
Simple Linear Regression with DAX - Microsoft Fabric Community
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Well, the data is report usage data. Dates, Number of views, so not random.
Maybe I'm not seting up the DAX correctly?