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. 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. 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-sigma. 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.