Context. Large spectroscopic Galactic surveys imply a selection function in the way they performed their target selection. Aims. We investigate here the effect of the selection function on the metallicity distribution function (MDF) and on the vertical metallicity gradient by studying similar lines of sight using four different spectroscopic surveys (APOGEE, LAMOST, RAVE, and Gaia-ESO), which have different targeting strategies and therefore different selection functions. Methods. We use common fields between the spectroscopic surveys of APOGEE, LAMOST, RAVE (ALR) and APOGEE, RAVE, Gaia-ESO (AGR) and use two stellar population synthesis models, GALAXIA and TRILEGAL, to create mock fields for each survey. We apply the selection function in the form of colour and magnitude cuts of the respective survey to the mock fields to replicate the observed source sample. We make a basic comparison between the models to check which best reproduces the observed sample distribution. We carry out a quantitative comparison between the synthetic MDF from the mock catalogues using both models to understand the effect of the selection function on the MDF and on the vertical metallicity gradient. Results. Using both models, we find a negligible effect of the selection function on the MDF for APOGEE, LAMOST, and RAVE. We find a negligible selection function effect on the vertical metallicity gradients as well, though GALAXIA and TRILEGAL have steeper and shallower slopes, respectively, than the observed gradient. After applying correction terms on the metallicities of RAVE and LAMOST with respect to our reference APOGEE sample, our observed vertical metallicity gradients between the four surveys are consistent within 1σ. We also find consistent gradient for the combined sample of all surveys in ALR and AGR. We estimated a mean vertical metallicity gradient of −0.241 ± 0.028 dex kpc −1 . There is a significant scatter in the estimated gradients in the literature, but our estimates are within their ranges. Conclusions. We have shown that there is a negligible selection function effect on the MDF and the vertical metallicity gradients for APOGEE, RAVE, and LAMOST using two stellar population synthesis models. Therefore, it is indeed possible to combine common fields of different surveys in studies using MDF and metallicity gradients provided their metallicities are brought to the same scale.