How does summation over time samples influences DFT? In case of DFT where we have following
$$
Y_{k}=\frac{1}{N}\sum_{n=0}^{N-1}y_ne^{-j{\frac{2\pi nk}{N}}}
$$


What happens in case when we change summation, e.g., increase or decrease number of $n$ that we are summation over? 
How does the rest of equation change?
For example if we decide to sum over $NM$ (if $M&lt;1$ we have windowing and if $M&gt;1$ we have zero padding so I do not assume adding any new info data just scaling the duration of the signal) samples would we rewrite the latter equation like this
\begin{equation}
Y_{k}=\sum_{n=0}^{MN-1}y_ne^{-j{\frac{2\pi nk}{MN}}}\tag{1}
\end{equation}
or this
\begin{equation}
Y_{k}=\sum_{n=0}^{MN-1}y_ne^{-j{\frac{2\pi nk}{N}}}\quad \tag{2}
\end{equation} 
And what is the explanation behind. Also what is the appropriate scaling when summation limits change?
If the length of your data is $NM$ long (regardless of $N$), your DFT should be $NM$ long, so the correct equation is (1).

The explanation is simple: how long is your data? Use that length for the DFT.

You may want to define:
$$
y'_n = \left \{ \begin{array}{cl}
y_n, &amp;  0 \le n \le N-1\\
0, &amp;  n \ge N\\
\end{array}
\right .
$$
and operate on that because $y_n$ for $n\ge N$ is not defined.