Forum Discussion
Quarter Linear Regression
Hi,
I am trying to create in PowerBi a QUARTERLY linear trend line that exists as a graphic element in excel, .
I tried the following DAX formula:
linearReg =
I followed the examples of the following links:
https://xxlbi.com/blog/simple-linear-regression-in-dax/
https://community.powerbi.com/t5/Desktop/Linear-Regression-to-predict-values/m-p/747142
https://www.youtube.com/watch?v=d1kHgFULcko
I am using a Date Dimension table that has a 1-* relation with table quantities that has two colums, date and quantity.
At this point I used on the x-axis a Quarter/year column from my date dimension.
However the result that I am obtaining is very far off from the values and the trend line of excel.
I already tried to use the quarter column from the date dimension, tried ignoring the date dimension table and only use the date from quantities table without the relationship. Also I tried to group the quantities table by year/quarter with no result
Can anyone help me?
Thank you in advance
Alberto Ferrari from SQLBi posted in a comment on one of his videos the following link:
Simple Linear Regression in DAX with Hierarchy on Date Table – Sergio Murru
I hope that this helps other people that, like me, needed something more "substantial" as an answer.
2 Replies
- v-easonf-msft
Community Support
Hi, FilipeSantos_pt
If possible, can you share some sample data and expected result in excel for further research?
Best Regards,
Community Support Team _ Eason - FilipeSantos_pt
Helper I
Alberto Ferrari from SQLBi posted in a comment on one of his videos the following link:
Simple Linear Regression in DAX with Hierarchy on Date Table – Sergio Murru
I hope that this helps other people that, like me, needed something more "substantial" as an answer.