Forum Discussion
Linear Forecasting
- Anonymous1 year ago
Hi jacquelineneo14 ,
Thanks lbendlin for the quick reply and solution. I have some other ideas to add:
1. Calculate the Average Net Hire:
AverageNetHire = AVERAGE(Table[NetHire])2. Create a Date Table:
Ensure you have a date table that covers the forecast period.3. Calculate the Forecast:
Forecast = VAR LastHistoricalDate = MAX(Table[Date]) VAR ForecastPeriod = 120 // 10 years * 12 months RETURN IF( Table[Date] > LastHistoricalDate, [AverageNetHire] * (DATEDIFF(LastHistoricalDate, Table[Date], MONTH) + 1), BLANK() )For more details, please refer:
Implementing linear regression in Power BI - SQLBI
Adding Trend Lines & Forecasts in Power BI - GeeksforGeeks
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.
Hi jacquelineneo14 ,
Thanks lbendlin for the quick reply and solution. I have some other ideas to add:
1. Calculate the Average Net Hire:
AverageNetHire = AVERAGE(Table[NetHire])
2. Create a Date Table:
Ensure you have a date table that covers the forecast period.
3. Calculate the Forecast:
Forecast =
VAR LastHistoricalDate = MAX(Table[Date])
VAR ForecastPeriod = 120 // 10 years * 12 months
RETURN
IF(
Table[Date] > LastHistoricalDate,
[AverageNetHire] * (DATEDIFF(LastHistoricalDate, Table[Date], MONTH) + 1),
BLANK()
)
For more details, please refer:
Implementing linear regression in Power BI - SQLBI
Adding Trend Lines & Forecasts in Power BI - GeeksforGeeks
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.