I have a large data set that spans about 3 years and it is getting added to constantly. Every quarter I want to run some script but I need to pull a subset of just the last 3 months or so. I know that I can set a Data Filter and set the minimum date and then run a subset on that selection.
However, I want to be able to send some script to other members of my team who do similar work with different accounts. What I would like to do is have script where i can just simply type in the minimum date that I want and it will create a data subset with just those observations. Then I can run script on those specific observations only.
The following script asks for the last entry in the data table of the date column and creates a data filter for all 10 days before the last entered date. You can adjust it to any kind of date Format of course, but should help you for the next step. The data table looks like the following:
dt =Current Data Table();
dt <<Data Filter(
Where(:Date >=(:Date[N Rows(Current Data Table())]-(60*60*24*10))),