Second Max in Tableau Calculated Field -


how can second highest value field in calculated field. in excel use large function there doesn't seem tableau equivalent. prefer calculation in tableau instead of using pass through function.

here 2 alternatives.

first, if want calculation happen on data source side, write lod calculation find max of field, name mymax

{fixed [my_dimension1], [my_dimension2] : max(myfield)} 

whether use fixed, include or exclude scope lod calc depends on how want scope analysis.

then write row level returns field value if less lod calc, , implicitly null otherwise, name myfieldexceptmax

if myfield < mymax myfield end 

the max of row level calc answer.

max(myfieldexceptmax) 

alternatively, if want operate on client (tableau) side find penultimate aggregated query result, can use on of ranking table calc functions, , filter show second ranking result.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -