When compression pressure is applied to tablets, it causes a reduction in the porosity of the tablet. This action causes a more compact mass to be formed. More compact mass prevents easy penetration of NIR radiation and hence decreases the scattered light during a transmission test. This changes the NIR spectra obtained from the sample and different levels of hardness can be calibrated from known samples. Tablet dissolution can also be measured because it is a function of compression pressure as well, which changes the NIR spectra.