The Compton scattering is a relativistic scattering of a photon by a free electron and is incoherent and inelastic. There are degrees of freedom in each scattering event associated with the atomic electron, and thus the Compton scattering of an X-ray is incoherent.
The measured X-ray line shape P(E) as a function of the analyzed photon energy E, can be given by the Hyperment function,
P(E) = S(E) + D(E) + G(E) ------------------- 
S(E) -- The Compton scattering of the photons within the detector.
D(E) -- The incomplete charge collection in the dead layer of the detector.
G(E) -- The major Gaussian peak.
Table 3816 shows that electrons interact with 1 electron, many electrons, 1 nucleus, and many nuclei in solids.
Table 3816. Effects of interactions of electrons in solids.
||Interaction with electron(s)
||Interaction with nucleus/nuclei
||Electron Compton effect; electron excitation (from 50 eV to a few keV: EDS and EELS)
||Plasmon excitation (< 50 eV, ~100 nm TEM specimen); Cerenkov effect
||Rutherford scattering; phonon scattering (< 1 eV, heat)
Note that the Compton scattering generates a background intensity in X-ray diffraction patterns.