I\'m trying to lag a field when it matches certain conditions, and because I need to use filters, I\'m using the MAX function to lag it, as the LAG function it