I'm trying to evaluate the difference between two rows using the "Dif" function; however, the evaluation is continuous and has no regard for other columns. For example, with the "Big Class" DT I run the script below, but it will still compute the weight difference between a male and female. Is there any way around this?
dt = Current Data Table();
dt << Sort( By( :age, :sex ), Order( Ascending, Ascending ) );
dt << New Column("Weight Delta", Formula(Dif(:weight)));