Get the second max value with table calc

Knowledge Drop

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.                

Version history
Last update:
‎07-07-2021 01:13 PM
Updated by: