Forum Discussion
Help with figuring out daily inventory
Good morning, I'm new to Power BI and I'm trying to learn as quickly as possible but I've hit a stumbling block that has eaten up a bunch of my time and I'm hoping someone can help me find the correct approach to solving this problem.
I have a dataset for our warehouse inventory that tracks "tasks". When a pallet comes into our warehouse, we assign a unique pack ID to the pallet and there will be multiple rows in the data set for this pack ID, one row for each individual task.
The key values here will be task type (REC, SHI, UNREC), Task Status (CPS, CPX, AVL, NEW), PackID (A unique number for the pallet) and date/time.
When an order comes in, we create a receive task that becomes "AVL". The warehouse worker will accept the task and complete it, which assigns a new pack ID to that pallet, prints a label, moves the status to CPS.
So the record will go from "REC - AVL" with no PackID to "REC - CPS - Pack ID - CompletedTime/Date"
If the pallet was received in error or incorrectly, it may at this point be "Unreceived" which reverses the process and takes that unique pack ID out of inventory and it create a record with "UNREC - CPS - PackID - Completed Time"
When we ship it, a task is created that states "SHI - AVL - PackID" and then when it is completed it becomes "SHI - CPS - PackID - DateCompleted"
So, given a pack ID that has been received and shipped I would have a record for that pack ID stating it was received and a second record with the same pack ID stating it was shipped.
I want to be able to create a visual that allows me to pick a date - say October 15th, 2022 - and it will show me how many pallets were in inventory on that day.
My original thought was to create a <=> statement where I would calculate the number of pallets that had been received prior to the given date, but eliminate any pallets that had shipped prior to that date - but I cannot seem to come up with a way for doing this.
Once I have this, I am hoping to create a table that has my inventory on hand for each day so that I can create an average pallet count/day/month/year...but this is probably a second step.
Does anyone have any ideas on how I should solve this problem?
Thanks in advance for any help you can provide.