I am trying to calculate a Date Difference in Days between the current row and the last row where a comment is non-missing. Any help greatly appreciated!
If( (:ID == Lag( :ID ) | Row() == 1) & !Is Missing( :Comments ), 0,
Date Difference( :Sampled Date, Lag(:Sampled Date, <FONT color="#FF0000">n=last row where !Is Missing(:Comments)</FONT>), "Day" )
)
