The physical setup is:
$$
\text{light source}
\quad
\overset{\mathcal{F}}{\underset{\text{(far field)}}{\Longrightarrow}}
\quad
\text{grating}
\quad
\overset{\mathcal{F}}{\underset{\text{(far field)}}{\Longrightarrow}}
\quad
\text{observation screen}
$$
where $\mathcal{F}$ denotes Fourier transform, as known in Fourier optics.
Let a single slit be $a(x)$, and denote $\delta_D(x)$ as the Dirac comb of spacing $D$. Denote $\star$ as convolution, the grating is:
$$
g(x) = a(x) \star \delta_D(x)
$$
Assume we illuminate the grating with a point light source $\delta(x)$, it becomes plane wave when hitting the grating:
$$
\delta(x)
\quad
\overset{\mathcal{F}}{\underset{\text{(far field)}}{\Longrightarrow}}
\quad
1 \cdot g(x)
\quad
\overset{\mathcal{F}}{\underset{\text{(far field)}}{\Longrightarrow}}
\quad
\text{sinc}(\pi D_1 x) \cdot \delta_{1/D}(x)
$$
where $D_1$ ($< D$) is the width of a single slit.
We identify the intensity be $|\text{sinc}(\pi D_1 x)|^2 \cdot \delta_{1/D}(x)$, i.e. discretized $|\text{sinc}(\pi D_1 x)|^2$ sampled at $D$ period, which is also known as the diffraction orders.
Let fill-factor be defined as $D_1/D$.
If $D_1 = D$, i.e. 100 % fill-factor, there will be no higher-order diffractions but only $0^{\text{th}}$.
If $D_1 < D$, usually around 90 % fill factor, the intensity would contain difraction orders like this:

So the energy depends on the fill-factor $D_1/D$ of your grating. The larger $D_1/D$, more energy at $0^{\text{th}}$-order.