Your formula
:SliderID == Lag(:SiiderID, 1 )
is a boolean operation. When the current rows value of SliderID is equal to the previous row's value os SliderID, "Lag(:SliderID, 1)", the value of the comparison will be "True" and therefore it will return a numeric value of 1. If the comparison of the current row's value of SliderID is not equal to the previous row's value of SliderID, the returned value will be a 0.
@stephen_pearson modification of turning the formula into an "If" clause will result in the same values.
The error that is listed out, is a response to the line
dABCR << Delete Rows;
and it is being returned, because no rows had been selected as a result of the line
dABCR << Select Where(SN == 1);
The only correction to this line would be to scope the column reference by placing a ":" in front of SN
dABCR << Select Where(:SN==1);
Jim