Sample Data ------------- Account ID Month #patients ---------- ------- ---------- 1 Jan2017 5 2 Jan2017 3 3 Feb2017 7 4 Feb2017 6 5 Feb2017 2 6 Mar2017 4 7 Apr2017 1 8 Apr2017 10 9 Apr2017 9 10 Apr2017 3 Typical calculation in SAS VA 7.4 ----------------------------------- Monthly Median (Easy using median function) ------------------------------------------- Month Median Patients --------- --------------- Jan2017 4 ( 5+3 ) /2 Feb2017 6 middle of ( 2,6,7 ) Mar2017 4 Apr2017 6 middle of ( 1,3,9,10 ) = (3+9)/2 = 6 Cumulative Monthly Median (Desired in SAS VA 7.4) Any idea how to calculate this assuming this is in a List Table with only two fields (Month and Median Patients)? ------------------------------------------------------------------------------------------------------------------------------------------------------------ Month Median Patients -------- ----------------- Jan2017 4 ( 5+3 ) /2 Feb2017 5 middle of ( 2,3,5,6,7 ) = 5 Mar2017 5 middle of (2,3,4,5,6,7 ) = (4+5) /2 = 4.5(approx. 5 when rounded) Apr2017 5 middle of(1,2,3,3,4,5,6,7,9,10) = (4+5) /2 = 4.5(approx. 5 when rounded)