Nanocrystalline alloy thin films offer a variety of attractive properties, such as high hardness, strength and wear resistance. A disadvantage is the large residual stresses that result from their fabrication by deposition, and subsequent susceptibility to defects. Here, we use experimental and modelling methods to understand the impact of minority element concentration on residual stresses that emerge after deposition in a tungsten-titanium film with different titanium concentrations. We perform local residual stress measurements using micro-cantilever samples and employ machine learning for data extraction and stress prediction. The results are correlated with accompanying microstructure and elemental analysis as well as atomistic modelling. We discuss how titanium enrichment significantly affects the stress stored in the nanocrystalline thin film. These findings may be useful for designing stable nanocrystalline thin films.