dissimilarity measure between categorical variables

#1
Hello, I have a problem. Indeed I have 9 categorical variables and I'm trying to do clustering variables.

Could you tell me if I'm doing the right thing ?

1) I calculate for each pair of variables the Cramer's V. I represent those associations in a matrix. I call it X.
2) I calculate 1-X and turn it into a distance matrix. I'm trying to create a matrix of dissimilarity. I call it D.
3) I do a hierarchical clustering on D (with the "Ward" criterion).


Thanks :)