Confusion about decibels I know that $\text{dB}$ actually represents dimensionless value, meaning, it is the ratio of two values that have the same dimension, for example:

$$p_1=10\log\frac{P_1}{P_0} $$

This can be expressed in decibels if $P_0=1\text{ W}$, however, if $P_0=1\text{ mW}$ then unit we use is $\text{dBm}$. 

I am wondering, are we allowed to subtract and add values if one of them is in $\text{dB}$ and another is $\text{dBm}$ ?

The reason i am asking this is because i've found an example in one workbook where two values are summed up where the first one was in $\text{dB}$ and another $\text{dBm}$, however, i don't understand how's that possible.

For example, if we say $p_1=10\text{ dB}$ and $p_2=20\text{ dBm}$ if we sum these two up, we end up with $30$ but how is this possible? It's $30$ what? $\text{dB}$ or $\text{dBm}$? I hope someone could clarify me this. Any help appreciated!
Short answer: $p_\textrm{dB} =\alpha\textrm{ dB}$ means multiplication factor (no unit) while $P_\textrm{dBm} =A\textrm{ dBm}$ is truly a power, nothing more!

Then $p_\textrm{dB} + P_\textrm{dBm} = 10\log_{10}(10^{\alpha/10} \times 10^{A/10})$ is a power, hence has unit $\textrm{dBm}$ in logarithm scale.

$p_\textrm{dB} + q_\textrm{dB} = 10\log_{10}(10^{\alpha/10} \times 10^{\beta/10})$ is factor, hence no unit (or $\textrm{dB}$ in logarithm scale).

$P_\textrm{dBm} + Q_\textrm{dBm} = 10\log_{10}(10^{A/10} \times 10^{B/10})$ is a power square ($\textrm{mW}^2$), unit undefined in logarithm scale.