Find the first non void order line using BAQ calculated field

Hi Everyone,

I am trying to use a calculated field in a BAQ to return the first line that has not been deleted or is void on the sales order detail. Can anyone help me to achieve this?

Thank you

Adrian.