Yep - It's nearly impossible to assign profit to those things - we have X revenue from Android licenses, what's the cost of an android license? Is it all the R&D that goes to UI or hardware research? What's the cost of a Youtube Ad?
Google makes money on ads, because its products span the entire internet.
Youtube, Gmail, Search, Maps, Android, Devices, Photos and Drive are how they get the data to make money on ads. Cloud, Android & Youtube would be a 2 trillion dollar company even without Google. They don't make money on these, because they don't need to make money on it.
Google, MSFT and Apple do a lot more and most of their products have large feature backlogs.
Different scenarios