Experiments and calculations are compared on d(y) distributions produced by heavy filtered, narrow X rays of average energies between 12 and 250 keV. The measurements were performed with a walled tissue-equivalent proportional counter (KFA counter). Numerical simulations of microdosimetric distributions were done with the electron track structure code MOCA-8. Electrons produced by photoelectric and Compton effect were treated separately in calculations in order to distinguish the contributions of both types of events in the resulting dose distributions. Transmission and energy degradation of the primary photon spectrum in the counter walls were assessed using a photon transport code. A good agreement between the measured and calculated microdosimetric distributions was achieved. In the energy range considered the shape of photon induced microdosimetric distributions depends not directly on the type of physical interactions in the counter but on the relation between the secondary electron range and the size of sensitive site.