R:
I have a data-set with N Products sales value from some yyyy-mm-dd to some yyyy-mm-dd, I just want to filter the data for the last 12 months for each product in the data-set.
Eg: Say, I have values from 2016-01-01 to 2020-02-01 So now I want to filter the sales values for the last 12 months that is from 2019-02-01 to 2020-02-01 I just cannot simply mention a "filter(Month >= as.Date("2019-04-01") & Month <= as.Date("2020-04-01"))" because the end date keeps changing for my case as every months passes by so I need to automate the case.