In materials and earth science, but also in chemistry, pharmaceutics and engineering, the quantification of elements and crystal phases in solid samples is often essential for a full characterization of materials. The most frequently used techniques for this purpose are X-ray fluorescence (XRF) for elemental analysis and X-ray powder diffraction (XRPD) for phase analysis. In both methods, relations between signal and quantity do exist but they are expressed in terms of complex equations including many parameters related to both sample and instruments, and the dependence on the active element or phase amounts to be determined is convoluted among those parameters. Often real-life samples hold relations not suitable for a direct quantification and, therefore, estimations based only on the values of the relative intensities are affected by large errors. Preferred orientation (PO) and microabsorption (MA) in XRPD cannot usually be avoided, and traditional corrections in Rietveld refinement, such as the Brindley MA correction, are not able, in general, to restore the correct phase quantification. In this work, a multivariate approach, where principal component analysis is exploited alone or combined with regression methods, is used on XRPD profiles collected on ad hoc designed mixtures to face and overcome the typical problems of traditional approaches. Moreover, the partial or no known crystal structure (PONKCS) method was tested on XRPD data, as an example of a hybrid approach between Rietveld and multivariate approaches, to correct for the MA effect. Particular attention is given to the comparison and selection of both method and pre-process, the two key steps for good performance when applying multivariate methods to obtain reliable quantitative estimations from XRPD data, especially when MA and PO are present. A similar approach was tested on XRF data to deal with matrix effects and compared with the more classical fundamental-parameter approach. Finally, useful indications to overcome the difficulties of the general user in managing the parameters for a successful application of multivariate approaches for XRPD and XRF data analysis are given.