Hi @OscarD, I noticed you didn’t provide a PBIX file. Providing one will help users and experts find a solution to your inquiry faster and better.
A perfect initial question includes all of the following:
A clear explanation of the problem you are experiencing
A mockup of the results you want to achieve
Your current work-in-progress PBIX file
Your underlying data file (to allow us to go into Power Query if necessary to transform your data and/or data model – often DAX questions really end up being data modeling solutions)
I have attached the power bi version of it. the file was originally created in excel power pivot. its converted to power bi with an import from excel in power bi.
I have indicated the required output in the Excel file (shared earlier) and highlighted in the green highlighted section in excel calculated with standard excel formulas that i am not able to replicate with the DAX functions.
The requirement is:
Production = Demand + Safetystock - Opening inventory - Initial inventory. Production is zero or +ve. Initial inventory applies only to the first period.
Opening inventory for a period = closing inventory of the prior period.
The formulas I have created fail when the initial inventory > demand for more than 2 periods.
Thanks for your input. This solution does not work for me. in my case the TotalSupplyQty (Production in my case) is dependent on the closing inventory of the prior period and not an input as in your example. And the closing quantity for the current period is dependent on the production of the current period. Perhaps there is something i am missing but not able to figure out… yet.
While our users and experts do as much as reasonable to help you with your inquiries, not all concerns can be attended to especially if there are some learnings to be done. Thank you!