Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
luizcdepaula
Creator III
Creator III

Days of Supply logic

Hello experts,

I am facing a challenge and I hope you can help. I need to build a days of supply logic that look into the future forecast. I found a similar post, however it gave a partial solution. Find post below.

Days of Supply Problem

The main difference on my logic is that we usually keep around 6 days of supply, so we need to use the Total Stock (Total Receipts + Stock on Hand) and check how many days based on forecast we will be able to cover. Find example below.

Test:

LOAD * INLINE [

    date, Forecast, Receipts, Stock on Hand, Total Stock

    01-01-13, 1217, 5550, 2670, 8220

    02-01-13, 1197, 1230, 7023, 8253

    03-01-13, 1101, 2320, 7152, 9472

    04-01-13, 1161, 1259, 8311, 9570

    05-01-13, 1431, 1010, 8139, 9149

    06-01-13, 1226, 970, 9723, 8893

    07-01-13, 2330, 1323, 6563, 7886

    08-01-13, 3002, 1789, 4884, 6673

    09-01-13, 1277, 1323, 5396, 6719

    10-01-13, 1045, 1456, 5674, 7130

    11-01-13, 879, 1232, 6251, 7483

Expected result

    date, Forecast, Receipts, Stock on Hand, Total Stock, DOS

    01-01-13, 1217, 5550, 2670, 8220, 5.9

    02-01-13, 1197, 1230, 7023, 8253, 5.33

    03-01-13, 1101, 2320, 7152, 9472, 5.25

    04-01-13, 1161, 1259, 8311, 9570, 5.29

    05-01-13, 1431, 1010, 8139, 9149, 5.3

    06-01-13, 1226, 970, 9723, 8893, 5.87

    07-01-13, 2330, 1323, 6563, 7886, 6.1

    08-01-13, 3002, 1789, 4884, 6673, 5.98

    09-01-13, 1277, 1323, 5396, 6719, 5.32

    10-01-13, 1045, 1456, 5674, 7130, 5.56

    11-01-13, 879, 1232, 6251, 7483, 5.89

So the calculation of DOS is as follows: Stock on Hand 8253 as   { 8220-1197 +1230 = 8253 and then 8253 -1101=7152 and then 7152-1161 = 5991 and then 5991 -1431=4560 and then 4560 -1226=3334 and then 3334 -2330=1004. So when it gets to the point where SOH is lower than forecast, it is divided 1004/3002=0.33} at this situation we consider 5.33 days for days of supply for day 02-01-13.

Please help.

Thanks in advance.

LD

20 Replies
luizcdepaula
Creator III
Creator III
Author

Sure, I can send you in Excel format. Here is not allowing me to attach. Can I send you through email?