When an X-ray beam is not monochromatic, the transmitted flux through an absorber is not an exponential function of the absorber thickness. Instead, it may be a sum of two, three, or more exponential functions depending on whether the beam contains photons of two, three, or more different energies. This work shows that if the thickness of a gaseous absorber is continuously varied by adjusting the gas pressure, the relative strength of different harmonics in the monochromator output can be determined. This method also provides an accurate means to measure the absolute cross section of the gas molecules, and in conjunction with a modified Samson type ion chamber may also be used to measure the absolute photon flux as well.