Calculation for severity of stock shortage

  • I have the following data and want to score it based on how severe the shortage is.

    PRODUCT, LEAD_TIME,D00,D01,D02 ..... D31

    Where D00 is my current stock holding and D01 to D31 are 31 days of stock calculations based on ins and outs.

    So if my stock goes negative after my lead time this should appear less severe than it going negative before I can replen.

    Also I could go negative for 3 days but then positive because a PO is due in. This is bad but not that bad! I want the calculation to take this into account.

    I have written a function that takes D01 to D31 as arguments and returns a score for the number of days that are negative. D01 negative gets 31, D02 is 30. I add these up and return the total. I ignore any negative days after the lead time.

    Hope you catch my drift.

  • ...

    Hope you catch my drift.

    try this: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply