You want simple linear regression trend-line model that describes the relationship between two variables date/date-time and orders.
• Create custom field that converts from human-readable date to epoch
Case date field in format "m/d/yyyy h:mm:ss AM/PM":
SecondDiff(createdate(getyear(<date field>),getmonth(<date field>),getday(<date field>)),createdate(1970,1,1))
Case date field in format "m/d/yyyy":
SecondDiff(<date field>,createdate(1970,1,1)) AS r_date
• R script
Whenever you use epoch field send it to R as aggregated argument.
The regression command is lm for linear model. We will store that model in a variable called fit The order of the variables is dependent followed by a tilde “~” followed by a list of independent variables