But those tech investments are eating away at the bottom line.

By Phil Wahba
August 17, 2017

Walmart wmt has poured billions into its e-commerce and tech to integrate its digital business with its stores, and the strategy is paying off handsomely.

The retailer said comparable sales at its 4,000 U.S. stores, a $300 billion a year business, rose 1.8% on the year in the three months to June, well above Wall Street expectations for 1.3% according to Consensus Metrix. That gave Walmart U.S. its 12th straight quarter of growth.

More crucially for the world’s largest retailer, shopper visits also increased, rising 1.3% and showing that Walmart’s massive investments in features like grocery curbside pickup, in-store order retrieval, its own mobile payment app and the expansion of its online assortment are spurring shoppers to come into stores.

The company has made clear that it sees the full integration of its U.S. stores and e-commerce as its best weapon to compete with Amazon.com amzn . Revenue from online sales rose an impressive 60% year-on-year.

But investments, along with more aggressive pricing generally, cost money. The company disappointed Wall Street with a profit forecast of 90 cents to 98 cents per share for the current quarter, compared with the 98 cents analysts expected. Wal-Mart Stores shares, which had been on a tear of late, slipped 1.5% in pre-market trading.

“Sales growth is coming from across the business – including stores, e-commerce and a combination of both,” CEO Doug McMillon said in a statement.

The chain also got a boost from its massive grocery business, which generates 56% of its revenue. Food saw its best quarter in five years, aided in large part by an overhaul of the fresh food business that aimed at better competing with the likes of Whole Foods Market wfm . Whole Foods is, of course, about to be bought by Amazon. The figures were particularly encouraging for Wal-Mart, given the recent arrival on American shores of deep discount German food retailer Lidl and the store expansion of its rival Aldi, which will put downward pressure on prices.

Other bright spots for the company included the performance of Sam’s Club, which chronically underperforms its rival Costco Wholesale cost . Comparable sales, a metric that strips out the impact of newly-opened or closed stores, rose 1.2%, but shopper traffic was up 2%. Further afield, nine of Wal-Mart Stores’ eleven markets saw comparable sales increases, including a first rise in sales in three years at its Asda unit in the U.K.

Still, the investments took a toll: Walmart earned $1.08 per share, slightly above $1.07 expected by analysts and roughly on par with a year-ago levels. Total sales were $123.36 billion, a hair above the $123.15 billion markets were expecting.

SPONSORED FINANCIAL CONTENT

You May Like