For phase quantification in a multi-phase system, you may perform single peak analysis or full diffraction pattern analysis, however, the latter one is better recommended to lower down statistical errors. I would suggest the Rietveld method for the minimization of systematic errors, using the most typical software tools, e.g., FullProf Suite. The following links might help you.
For multiple phase quantification, you can perform Rietveld refinement. However, if you don't know how to use that, by just taking the ratio of area of peaks of different phase. You can estimate the phase percentage qualitatively.
Any modern equipment for X-ray structural analysis contains a program for phase analysis (colloquially - Rietveld). You just need to correctly formulate the task for the operator. Usually, it is enough to know approximately the elemental composition (to limit the search for the main phases). The method you mentioned was used to roughly estimate the phase composition in the 50s-60s of the 20th century using closest peaks (There is a dependence of the intensity of the peaks on the diffraction angle etc.).
By the way, in thin films (depending on the obtainment method), the texture (predominant orientation) can be especially manifested, and then one cannot do without detailed calculations of the intensity.
you should use a spinning sample stage. The spinning movement will decrease the texture arifacts but will not completely remove them. So peak area ratios will give in this case still only rough estimates of the phase ratios.
I would like to point out to colleagues that the question concerns the quantification of the components of a thin film. Due to stratification, possible preferred orientation and microstress, serious quantification may be unrealistic. Nothing to pay, what lies above is overrated. Estimates of the percentage of peak areas, this is the ancient history of x-ray diffraction, so 50 years. Corrections for linear absorption coefficients were also subsequently performed.
Devika Vipin, first of all, do you mean a single layer film with more than one phase or multilayers film?
Most applications for thin-film are either XRR or RSM.
If you have multiple phases in a single layer then GI-XRD or IP-XRD (ultra-thin) is the setup. The quantification will not be easy due to the texture and or huge domain size.