In amorphous materials, the X-ray emission from all elements is increased with the incident electron beam current and thus the observed X-ray ratio between different elements is not affected.
For ordered materials (e.g. crystals) significant variation in the ratio of X-ray intensities can be induced. In this case, the variation originates from the effect of channelling enhanced X-ray emission. This phenomenon occurs when the thin, single crystal is orientated so that the specific atom sites in a crystalline compound are parallel to the incident electron beam if a parallel (not convergent) illumination is used. Therefore, in crystalline materials, similar to X-ray diffraction (XRD) measurements, anomalously high X-ray intensities in EDS measurements are generated when the specimen is close to Bragg condition, because diffraction may influence the intensity of the ionization edge, and thus the X-ray emission is preferentially orientated emission.
Precise correction for elemental quantification extracted from EDS maps in crystalline specimens is a difficult task because it is complicated by the existence of diffraction, and channeling and blocking effects; it would require:
i) Measurement of intensity in the diffraction plane;
ii) Knowledge of the crystal structure;
iii) Knowledge of the orientation of the crystals;
iv) Measurement of the specimen thickness.
In some cases we need to minimize the effects of channelling enhanced emission, e.g. in elemental quantifications and thus, measurements should be performed with the crystalline orientation far away from the exact Bragg conditions and with a highly convergent beam rather than a parallel beam. Furthermore, the use of a large convergence angle, as occurs in the STEM mode with a focused probe also minimizes the problem. In summary, some technique can be used to minimize the diffraction effects:
i) Rocking beam illumination can smooth out the strong diffraction contrast, 
ii) Record elemental maps under hollow cone illumination ,
iii) Use precession electron diffraction to record the spectrum,
iv) Use a large convergence angle.
 F. Hofer and P. Warbichler, “Improved imaging of secondary phases in solids
by energy-filtering TEM,” Ultramicroscopy 63, 21–25 (1996).
 J. Marien, J.M. Plitzko, R. Spolenak, R.-M. Keller, and J. Mayer, “Quantitative
electron spectroscopic imaging studies of microelectronic metallization layers,”
J. Microsc. 194, 71–78 (1999).