The uncertainty and challenges in the global economy have hurt Microsoft, which on Tuesday reported quarterly earnings that fell short of Wall Street's and its own expectations.

The company said it had $51.9 billion in sales in the second quarter, up 12 percent from a year ago. A 2 percent increase in profit was reported.

The results didn't meet Microsoft's lowered expectations. The company lowered its guidance due to the strong U.S. dollar.

Chris Capossela, the company's marketing chief, was bullish after the revised guidance was released. We can't control that.

The conditions seem to have gotten worse since then. Microsoft had to convert sales in Europe, Japan and elsewhere back into U.S. dollars due to foreign currency challenges. The decline in sales of its Windows operating system was caused by production problems in China and falling consumer demand.

The revenue decline was caused by a decrease in advertising spending on Microsoft products.

Microsoft's flagship cloud computing platform would have grown 46 percent if it weren't for currency issues. It grew less than investors expected. The company would have met its initial guidance if the dollar had not strengthened.

In an interview on Tuesday, Microsoft's head of investor relations said that commercial demand was feeling healthy. The long-term thesis of people wanting to move to the cloud is still intact.

There were a record number of deals worth more than $1 billion.

Revenue from Microsoft's commercial cloud computing offerings increased by 28 percent.

The company sees real opportunity to help every customer in every industry use digital technology to overcome today's challenges.

Microsoft's personal computing business grew 2% to $14.4 billion, dragged down by a 2% decline in sales of its Windows operating system for personal computers. The weakness was expected because shipments of PCs are down due to weakened demand and supply chain problems caused by the coronaviruses in China.

Consumers spent less time playing video games as a result of the revenue fall.

The professional social network Microsoft bought in 2016 grew 26 percent, down from 34 percent in the previous quarter.

The company had to pay $126 million in expenses related to scaling down its operations in Russia, and another $113 million in costs for laying off workers.

The layoffs were for a small number of roles and the company expected to increase its head count in the new fiscal year.