Please can you elaborate as to what it is you are trying to do. Checking your attached spreadsheet has no further indication of what it is you are trying to do, aside from a hard-coded calculation of (4/7)*100
I will explain the logic in detail.
attached spredsheet is for the date 4/12/2018. my week start date is every monday which is starting 4/9/2018. number of days left in the current week is 4.
My SLA is 15 for that item. means the first 15 days i have to deliver something without fail. that is my target percentage.
first row: only 4 days are left in the week and i have to deliver completely for the week. so my target for the week is 100%.
(15-4=11). Now I have 11 days left in the SLA.
second row: 7 days in the week and i have 11 days left in the SLA. so I have to deliver completely for the week. so my target is 100%.
(11-7=4). Now i have 4 days left in the SLA.
Third row: 7 days in the week and I have only 4 days left in the SLA. so I have to deliver only for the 4 days. so my target is 4/7 =.57
rest of the rows can be 0.
I hope this is clear and thanks for your help.