A , nite group G, in which two randomly chosen subgroups H and K commute, has been classi, ed by Iwasawa in 1941. It is possible to de, ne a probabilistic notion, which \measures the distance" of G from the groups of Iwasawa. Here we introduce the generalized subgroup commutativity degree gsd(G) for two arbitrary sublattices S(G) and T(G) of the lattice of subgroups L(G) of G. Upper and lower bounds for gsd(G) are shown and we study the behaviour of gsd(G) with respect to subgroups and quotients, showing new numerical restrictions.