View the original community article here
Last tested: Jun 1, 2018
We can use the approach below to exclude the max value using and if() then applying a max on the remaining values
max(if(${orders.count}!=max(${orders.count}), ${orders.count}, null))
(and so on for 3rd max...)
For pivoted results:
max(pivot_row(if(pivot_index(${orders.count},pivot_column())!=max(pivot_row(${orders.count})), ${orders.count}, null)))
This content is subject to limited support.