I am trying to get stacked indices using subarray/substack using the following snippet, but I am not seeing stacking beneath the sum symbol. This is the type of output I am expecting, 
but this is what I am getting:

Here is the code:
\documentclass{report}
\usepackage{amsmath, amsfonts, amssymb}
\begin{document}
\[
\frac{\sum_{\begin{subarray}{l}\forall x \\
\mathcal{D}(x)=\mathcal{D}_i\end{subarray}} \sum_{\substack{\forall
y\in\Omega(x) \\
\mathcal{D}(y)=\mathcal{D}_j}} 1}
{\sum_{\forall x }\mathcal{D}(x)}
\]
\end{document}
What should I do to get proper stacking?

\displaystylein the numerator and denominator of\frac. – Werner Aug 25 '14 at 17:39