Forecasting Inventory in Tableau Using Relationships

//Inventory Calculation = DATE(DATEADD('day',1,[Date (Inventory)]))//Shipments Calculation = DATE(
IF [Status]="arrived" THEN [Date Arrived]
ELSEIF [Status]="in transit" THEN DATEADD('day',60,[Date Departed])
ELSEIF [Status]="waiting at port" THEN DATEADD('day',5,DATE(7/16/2021))
ELSEIF [Status]="waiting to depart" THEN DATEADD('day',60,DATE(7/16/2021))
END
)
//Starting Inventory = If ATTR([Max Day = Date]) THEN SUM([Amt]) END
//Churn ={ FIXED WEEK([Date]):SUM([Churn Prediction])}/7
//Daily Change = [Quantity Predicted]-SUM([Churns])
//Daily Change = If ATTR([Max Day = Date]) THEN SUM([Amt]) 
ELSE
LOOKUP(
RUNNING_SUM(SUM([Amt]))+
RUNNING_SUM([Daily Change]),-1)
END
//Total EOD = [DailyStarting Amt]+[Daily Change]

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store