The easiest starting point is to use the built-in trend line. See screen shot below.
If you want to show the slope or correlation in the title or tooltip, you can calculate these manually.
r = correlation:
r order date and count =
WINDOW_CORR(ATTR(INT([Order Date])), COUNT([Order ID]))
slope = r * StdDev y / StdDev x =
[r order date and count] * WINDOW_STDEV(COUNT([Order ID])) /
Note that WINDOW_XXX are table calculations, which are "aggregates of aggregates". The aggregates, in this case, are COUNT(Order ID) and ATTR(INT(Order Date)). The date is converted to an int and then the ATTR() is used to aggregate it. ATTR() is sort of a helper aggregation where Order Date will be returned if there is only one value of order date for the mark.
For this to work, you need order date in the view. Most likely it'll be your x-axis as an "exact date" pill. If you want to aggregate at a different date level (week, month, quarter), you'd need to use the DATETRUNC(period, [Order Date]) function in both the calculated fields and the pills in the view. The period can be parameterized for week, month, quarter, ...
And if you just want the slope, you could use cov / var.
//slope of trend line = cov(x,y) / var(x)
WINDOW_COVAR(SUM([Profit]), SUM([Sales])) / WINDOW_VAR(SUM([Profit]))