09-07-2017 06:17 AM - last edited 04-12-2018 23:19 PM
Daniil, (or anyone else knowledgeable)
Many thanks for this but I am struggling a little with adapting it to my needs, as I am still quite new to DAX.
I am trying to create a sales prediction model and want to use the linear trend from just the last 12 months, I believe your current code will give me the linear regression from all of the data.
How do a go about just using the last 12 months of data to feed the regression.
Many thanks for anyone that might be able to help,
I'm trying to find the slope of a graph comparing 2 pollution datasets. I altered your measure to do this. The measure works well until it comes to summing the X^2 and XY values. The multiplication doesn't work and this affects the slope calculation.
What could be causing this problem?
PS: I'm very inexperienced with Power BI, so forgive me if this is a stupid question related to SUM and SUMX.