sorry for bits and pieces. i am trying to look if at any point of time tot_MED for that day has reached above 200 or not with in reporting period (7/1/17 - 12/31/17). if the fill date is before reporting period and days supply extending into reporting period i am considering bg_date as reporting period begin date instead of actual fill_Dt and same for that extending out side reporting period. ID Days_supply MED Fill_DT end_Date bg_Date 1 30 22.5 6/30/2017 7/29/2017 7/1/2017 1 30 180 6/30/2017 7/29/2017 7/1/2017 1 30 22.5 7/31/2017 8/29/2017 7/31/2017 1 30 22.5 9/1/2017 9/30/2017 9/1/2017 1 30 22.5 9/29/2017 10/28/2017 9/29/2017 1 30 180 9/29/2017 10/28/2017 9/29/2017 2 30 37.5 6/30/2017 7/29/2017 7/1/2017 2 30 37.5 7/31/2017 8/29/2017 7/31/2017 2 30 37.5 8/31/2017 9/29/2017 8/31/2017 2 30 37.5 10/2/2017 10/31/2017 10/2/2017 2 30 37.5 10/31/2017 11/29/2017 10/31/2017 2 30 37.5 11/29/2017 12/28/2017 11/29/2017 2 30 37.5 12/27/2017 12/31/2017 12/27/2017 3 3 18 7/18/2017 7/20/2017 7/18/2017 3 2 50 8/12/2017 8/13/2017 8/12/2017 4 5 15 10/4/2017 10/8/2017 10/4/2017 5 90 7.5 6/21/2017 9/18/2017 7/1/2017 5 90 15 9/22/2017 12/20/2017 9/22/2017 6 30 60 6/13/2017 7/12/2017 7/1/2017 6 30 60 7/14/2017 8/12/2017 7/14/2017 6 30 60 8/10/2017 9/8/2017 8/10/2017 6 30 60 9/11/2017 10/10/2017 9/11/2017 7 30 160 6/6/2017 7/5/2017 7/1/2017 7 30 160 7/6/2017 8/4/2017 7/6/2017 7 30 160 8/4/2017 9/2/2017 8/4/2017 7 30 45 9/2/2017 10/1/2017 9/2/2017 7 30 45 10/1/2017 10/30/2017 10/1/2017 7 30 45 10/30/2017 11/28/2017 10/30/2017 7 30 45 11/28/2017 12/27/2017 11/28/2017
... View more