Hi @JensD ,
I completely agree with @txnelson, you should look into the Time Series Platform, it's great for looking at cross-correlation of time data between two signals. I've used this a lot to compare production data signals with QC data to find time lags.
When you run that platform, you'll put one of the columns as Y, Time Series and the other as Input List (and choose the Autocorrelation Lags to be about 1/2 of the number of rows in your data table). Then, you'll want to run the Cross Correlation utility under the hot button next to the Transfer Function Analysis.
Also, building off what @txnelson wrote for his code, you can even create a table variable (e.g. rowlag) and give it a value and modify his column formula to be:
If( Row() >= :rowlag,
y = :height[Index(Row()-:rowlag+1, Row())];
y = :weight[Index(Row()-:rowlag+1, Row())];
lin = Linear Regression(y`, x`);
Sqrt(lin[3]["RSquare"]);
)
That way, each time you change the rowlag value in the data table, it will update that column with the correlation values so you can easily test different lags without changing the column formula each time.
Good luck!,
DS