IIRC, line sequence number start at 1, so there is never a 0. If you’re trying to get the header level of a transaction you need {lineid} = 0. If you’re trying to get the first line in the sublist it’s {linesequencenumber} = 1.
Separately, I’m not sure what you’re trying to achieve with “<>”. If youre looking for “not equal to” then the proper syntax is “!=“
Finally, not sure this really matters, but I’d return 0 rather than null for non-matching results on numeric formulas, so you don’t accidentally run into null value issues.