I have a dataset, which contains: Date ,GadgetId ,SomeMeasurement I would like to calculate the median of SomeMeasurement for every month whilst considering the retrospective/previous data. Example: Date GadgetId SomeMeasurement 31-Jan-15 A1 5 26-Jan-15 A1 3 26-Jan-15 A1 3 26-Jan-15 A1 3 03-Feb-15 A1 5 07-Feb-15 A1 5 07-Feb-15 A1 5 07-Feb-15 A1 4 02-Feb-15 A1 5 02-Feb-15 A1 5 03-Feb-15 A1 5 02-Feb-15 A1 5 07-Feb-15 A1 4 03-Feb-15 A1 5 In month Jan 2015 one would consider the values of this month only to calculate the median. In month Feb 2015 one would consider the values in Jan 2015 and Feb 2015, in Dec 2017 one would consider the data for Dec 2017 and all the previous months etc. Please note that each dataset contains several GadgetIds so a BY GadgetId would be required I suppose. Also each GadgetId has different number samples/dates (some may only have 1 year's worth of data whereas others may have several year's worth of data).
... View more