Let $\mathcal{S}_x$ and $\mathcal{S}_y$ be a finite discrete sets, such that
$$ 0 < |\mathcal{S}_x| < \infty, \qquad 0 < |\mathcal{S}_y| < \infty, \qquad \mathcal{S}_x \cap \mathcal{S}_y = \emptyset $$
Let $\mathcal{T}_x$ and $\mathcal{T}_y$ be non-empty sets such that
$$ \mathcal{T}_x \subseteq \mathcal{S}_x, \qquad \mathcal{T}_x \neq \emptyset; \qquad \qquad \qquad \mathcal{T}_x \subseteq \mathcal{S}_y, \qquad \mathcal{T}_y \neq \emptyset $$
Let $\mathcal{X} = \left\{ x_i \right\}_{i=1}^m$, and $\mathcal{Y} = \left\{ y_i \right\}_{j=1}^n$ be partitions of $\mathcal{S}_x$ and $\mathcal{S}_y$ respectively, i.e.
$$ \sqcup_{i=1}^m x_i = \mathcal{S}_x; \qquad \qquad \qquad \sqcup_{j=1}^n y_j = \mathcal{S}_y $$
where $\sqcup \cdot$ is a disjoint union.
Define measures $\; \mu_x: \mathcal{X} \to \left[0,\, |\mathcal{T}_x|\right]\;$ and $\;\mu_y: \mathcal{Y} \to \left[0,\, |\mathcal{T}_y|\right]\; $ as
$$ \mu_x(A) = |A \cap \mathcal{T}_x|, \qquad \forall\, A \subseteq \mathcal{X} $$
$$ \mu_y(B) = |B \cap \mathcal{T}_y|, \qquad \forall\, B \subseteq \mathcal{Y} $$
Now I want to design a measure $\mu : \mathcal{X} \times \mathcal{Y} \to \left[0,\, |\mathcal{T}_x||\mathcal{T}_y| \right]$, which cannot be factorized as a product of measures $\mu_x$ and $\mu_y$, i.e.
$$ \mu(A, B) \neq \mu_x(A) \mu(B) $$ except when on the boundaries, or more precisely such that
$$ \forall\, A \subseteq \mathcal{X}: \qquad \mu(A, \emptyset) = 0 \qquad \text{and} \qquad \mu(A, \mathcal{Y}) = \mu_x(A) |\mathcal{T}_y| $$
$$ \forall\, B \subseteq \mathcal{Y}: \qquad \mu(\emptyset, B) = 0 \qquad \text{and} \qquad \mu(\mathcal{X}, B) = |\mathcal{T}_x| \mu_y(B) $$