Forum Discussion
JGomez_2012
2 years agoFrequent Visitor
Inventory Forecast Weekly
Hello Community, I need to create a weekly forecast of my inventory based on 3 tables: Actual Inventory Arrived Orders Sale Forecast The structure of the tables is like this: Actual Inven...
PurpleGate
2 years agoResolver III
Hey,
I had a similar situation to yours and solved it like this: maybe this will work for you too?
first i made a Weekly Sales Forecast.
Weekly_Sales_Forecast =
VAR MonthlyForecast = SUM('Sales Forecast'[MontlySales])
VAR DaysInMonth = DAY(EOMONTH(MIN('CalendarDate'[Date]), 0))
VAR DaysInWeek = COUNTROWS(VALUES('CalendarDate'[Date]))
RETURN
DIVIDE(MonthlyForecast, DaysInMonth, 0) * DaysInWeek
then a measure to calculate the quanity of orders each week:
Weekly_Arrivals =
CALCULATE(
SUM('Arrived Orders'[quantity_expected]),
FILTER(
'Arrived Orders',
'Arrived Orders'[expected_date] >= MIN('CalendarDate'[Date]) &&
'Arrived Orders'[expected_date] <= MAX('CalendarDate'[Date])
)
)
Then an initial inventory for each item at the start of the week:
Initial_Inventory =
CALCULATE(
SUM('Actual Inventory'[quantity_on_hand]),
FILTER(
'Actual Inventory',
'Actual Inventory'[item] = MAX('CalendarDate'[item]) &&
'Actual Inventory'[loc] = MAX('CalendarDate'[loc])
)
)
Then combined it to get the weekly forecast
Weekly_Forecasted_Inventory =
VAR InitialInventory = [Initial_Inventory]
VAR WeeklyArrivals = [Weekly_Arrivals]
VAR WeeklySalesForecast = [Weekly_Sales_Forecast]
RETURN
InitialInventory + WeeklyArrivals - WeeklySalesForecast
- JGomez_20122 years agoFrequent Visitor
Thanks for your answer, but got the same issue the weekly forecast is not moving forward. with your measures i have the same results that i had before.