PepsiCo reported better-than-expected revenue in the third quarter despite weaker demand for its snacks and drinks in North America.

Revenue rose 2.6 percent to $23.94 billion in the July-September period. That was better than the $23.84 billion Wall Street was expecting, according to analysts polled by FactSet.

In North America, PepsiCo said sales volumes for its Frito-Lay snacks and other foods fell 2 percent in the quarter while sales volumes for its beverages were down 3 percent. Sales volumes were higher in Latin America and Asia.

PepsiCo said earlier this year that inflation and changing consumer preferences have weakened demand for the company’s drinks and snacks. The company has been trying to combat perceptions that its products are too expensive by expanding distribution of value brands such as Chester’s and Santitas. It also is accelerating a shift to remove artificial colors from its products.

Net income fell 11 percent to $2.6 billion. Adjusted for one-time items, the company earned $2.29 per share. That also beat analysts’ forecasts of $2.26.

The company, based in Purchase, N.Y., has been under some pressure from Elliott Investment Management, an activist investor that recently took a $4 billion stake in PepsiCo.

In a letter sent to PepsiCo’s board last month, Elliott said the company has been hurt by loss of market share in its North American beverage business and slowing growth and weaker profits in its North American food business.

Elliott wants PepsiCo to slim down its food and beverage portfolio so it can reinvest in core brands such as Mountain Dew or new products such as protein snacks. It also wants the company to consider refranchising its North American bottlers, an action that its rival Coca-Cola took in 2017.

PepsiCo also named Walmart executive Steve Schmitt as its new chief financial officer. Schmitt was the CFO for Walmart’s U.S. division.