Recent works of Andrews-Newman and Hopkins-Sellers unveil an interesting relation between two partition statistics, the crank and the mex. They state that, for a positive integer n, there are as many partitions of n with non-negative crank as partitions of n with odd mex. In this paper, we provide a generalization of this identity and prove it bijectively. Our method uses an alternative definition of the Durfee decomposition, whose combinatorial link to the crank was recently studied by Hopkins, Sellers, and Yee.