How to calculate total power from spectrum?
For a band limited power spectral density \$S(f)\$ to obtain the total power all you need to do is integrate over the spectrum. In measured data the power is measured in discrete frequency steps, so despite the fact that it may show that the measurement is in dBm it is actually in dBm/Hz. The first step is to convert your power measurement into a linear scale,

$$
S_{lin} = 10^{S_{dBm}/10} \qquad (mW/Hz).
$$

Once you have your power in a linear scale you can then integrate over the total bandwidth to obtain the power,

$$
P = 2\int^{f_c + BW/2}_{f_c - BW/2} S(f)_{lin}df.
$$

or since you are using a set of discrete data,

$$
P = 2\sum_{n = 1}^N S(f_n)\Delta f.
$$

The factor of 2 accounts for negative frequencies.