Predefined formulas and filtering

Hi, thats what I mean. when i sort or filter the formula for some reason changes. i thought that row# would change automatically. I preset the formulas in the data being loaded. Or is that the wrong way?