Any ideas on how can I use MSTR to calculate the number of weeks i had inventory supply for.
Week 1, I had 100 units on hand, I sold 50 of those units and did not recieve any from the factory,
Week 2, I had 50 units on hand, I sold 25 of those units and did not recieve any from the factory,
Week 3, I had 25 units on hand, I sold 25 of those units and recieved 100 new units from the factory,
Week 4, I had 100 units on hand, I sold 25 of those units and did not recieve any from the factory,
Week 5, I had 75 units on hand, I sold 0 those units and recieved 25 new units from the factory.
WEEK ONHAND UNITS_SOLD UNITS_RECD
=========================================================================================================
1 100 50 0
2 50 25 0
3 25 25 100
4 100 25 0
5 100 0 25
What I want to do is:
Count the number of weeks that the sum(units_sold) is less than or equal to the onhand for a given week.
In other words, for Week 1, I had 100 units on hand, and the sum(units_sold) for Week 1, 2 and 3 addup to 100 so, 3 three weeks of supply is what I had for Week 1.
Any ideas?
Thanks in advance.
-dinzana
Week 1, I had 100 units on hand, I sold 50 of those units and did not recieve any from the factory,
Week 2, I had 50 units on hand, I sold 25 of those units and did not recieve any from the factory,
Week 3, I had 25 units on hand, I sold 25 of those units and recieved 100 new units from the factory,
Week 4, I had 100 units on hand, I sold 25 of those units and did not recieve any from the factory,
Week 5, I had 75 units on hand, I sold 0 those units and recieved 25 new units from the factory.
WEEK ONHAND UNITS_SOLD UNITS_RECD
=========================================================================================================
1 100 50 0
2 50 25 0
3 25 25 100
4 100 25 0
5 100 0 25
What I want to do is:
Count the number of weeks that the sum(units_sold) is less than or equal to the onhand for a given week.
In other words, for Week 1, I had 100 units on hand, and the sum(units_sold) for Week 1, 2 and 3 addup to 100 so, 3 three weeks of supply is what I had for Week 1.
Any ideas?
Thanks in advance.
-dinzana