SELECT
*,
LAG(orderdate, 1, NULL) OVER (PARTITION BY fullaccountnum, cin ORDER BY orderdate) AS previous_orderdate
FROM
table.revenue_invoice_data
I've tried the expression below in the formula tool to no avail. I keep getting the error: syntax or semantic error analysis.
fullaccountnum == [fullaccountnum-1] &&
cin == [cin-1] ? [orderdate-1] : Null()
Use the Multi-Row Formula tool to get equivalent of
LAGfunction. If the column name iscol1, then the equivalent expression to be used in the Multi-Row Formula to access previous row's data is[Row-1:col1]