2nd to Max value in a BAQ

Hi All,
I am editing a BAQ and I need to retrieve a 2nd to Max value in a sub query. I can obviously use MAX() as a calculated field to get the Max value. However I need the 2nd to Max value.
Does anyone know how I could get this into a calculated field in the BAQ?

thanks in advance

This thread should help. Basically you want a calculated field that returns the row number, grouped and sorted how you want. You can then return the result with row number ‘2’.

5 Likes

Thanks for the quick response I will give that a go.