**UPDATE**: We have reached 850 SUBSCRIBERS as of 3/17/2022. What date did the model predict we would hit this goal - youtu.be/4vB28dwiHUI
We have reached 500 subscribers!
In this video I will teach you how to build a simple linear regression model to predict the exact day when the channel will hit 1,000 subscribers.
0:00 Start
0:28 YouTube Dataset
2:01 Calculate Running Total
6:24 The Regression Equation
8:37 Regression in DAX
16:25 Graphing Regression Line
17:10 The Slope
24:57 Expected Goal Date
29:12 Regression past Current Day
35:16 Thank You!
I apologize about the audio quality during the first few minutes. Issues with my MIC.
Helpful blog: xxlbi.com/blog/simple-linear-regression-in-dax/
DAX FORMULAS -
RUNNING TOTAL:
TimeFrameSubscribers =
CALCULATE(Sum(Subscribers[Subscribers]),
FILTER(ALLSELECTED(Subscribers),
Subscribers[Date] <= Max(Subscribers[Date]))
)
REGRESSION EQUATION (DAX):
RegressionLine =
var data =
FILTER(
SELECTCOLUMNS(ALLSELECTED(Subscribers),
"x_values",Subscribers[Date],
"y_values",[TimeFrameSubscribers]
),
AND(
NOT(ISBLANK([x_values])),
NOT(ISBLANK([y_values]))
)
)
--Variables to Solve for:
var y_sum = SUMX(data,[y_values])
var x_sum = SUMX(data,[x_values])
var x2 = SUMX(data,[x_values]^2)
var xy = SUMX(data,[x_values]*[y_values])
var row_count = COUNTROWS(data)
--Solve for formula
var Intercept = (y_sum * x2 - x_sum * xy)/ (row_count * x2-(x_sum) ^2)
var Slope = (row_count * xy - x_sum * y_sum)/( row_count * x2-(x_sum) ^2)
--Regression
var Regression = SUMX(Subscribers, Slope * Subscribers[Date] + Intercept)
return Regression
- Power Bi : Build a simple Linear Regression Equation in DAX to Predict a Goal ( Download)
- PREDICT THE FUTURE with LINEAR REGRESSION / How to use LINEST function / Beginners Guide to Power BI ( Download)
- DAX for Power BI - Predicting Days Until a Goal (Linear Regression) ( Download)
- How to do Simple Linear Regression in Power BI | Diana Arciniega ( Download)
- The New LINESTX() DAX Function in Power BI - Clearly Explained #linearregression ( Download)
- Implementing linear regression in Power BI ( Download)
- The New LINEST() DAX Function in Power BI - Regression Analysis Made Easy #regressionanalysis ( Download)
- Power Bi : Evaluating my linear regression model ( Download)
- Tutorial: Power BI: February 2023 Update: Simple Linear Regression using LINEST() DAX Function ( Download)
- Linear Regression Into Power BI By multiple slicers ( Download)
- How to Forecast Using DAX // Power BI ( Download)
- DAX Fridays! #135: Linear Regression in Power BI ( Download)
- How to predict values using linear regression in power bi | Power BI scenarios videos ( Download)
- Power BI - DAX function - ANY ( Download)
- Profit Prediction Techniques in Power BI - Scenario Analysis w/DAX ( Download)