Hi James,

You could try the following, it might work:

iif(sim.max_depth2d>sim2.max_depth2d, sim2.max_depth2d, sim.max_depth2d)

good luck,