The invention of silicon drift detectors has resulted in an unprecedented improvement in detection efficiency for energy-dispersive X-ray (EDX) spectroscopy in the scanning transmission electron microscope. The result is numerous beautiful atomic-scale maps, which provide insights into the internal structure of a variety of materials. However, the task still remains to understand exactly where the X-ray signal comes from and how accurately it can be quantified. Unfortunately, when crystals are aligned with a low-order zone axis parallel to the incident beam direction, as is necessary for atomic-resolution imaging, the electron beam channels. When the beam becomes localized in this way, the relationship between the concentration of a particular element and its spectroscopic X-ray signal is generally nonlinear. Here, we discuss the combined effect of both spatial integration and sample tilt for ameliorating the effects of channeling and improving the accuracy of EDX quantification. Both simulations and experimental results will be presented for a perovskite-based oxide interface. We examine how the scattering and spreading of the electron beam can lead to erroneous interpretation of interface compositions, and what approaches can be made to improve our understanding of the underlying atomic structure.