Retailing week on the stock market hasn't been a fun one for investors. Several big players lowered their 2022 earnings outlook, causing the sector, and the wider market, to slump.

But the early Thursday report from BJ's Wholesale Club Holdings (BJ 0.67%) showed solid sales growth and only a modest impact from inflation on earnings. The results suggest that the wholesale retailing niche might perform well through the wild shifts that are happening in consumer spending today. That factor also bodes well for the upcoming report from Costco Wholesale (COST -0.37%), slated for Thursday, May 26.

A person shopping at a warehouse store.

Image source: Getty Images.

Avoiding losses

BJ's Wholesale posted solid sales trends for the period that ran through late April. Comparable-store sales rose 4% after excluding gasoline, which was right on par with Target's (TGT -0.73%) strong result.

Comps were up a blazing 14% if you include gas in the mix. BJ's also reported busy shopping aisles, which helped push its positive 2021 momentum into this year. "Our performance ... was strong, as gains in member traffic underscored the value we provide," CEO Bob Eddy said in a press release.

That comment echoed Target's comments earlier in the week, but BJ's avoided the earnings shortfall that sent Target's stock reeling. Gross profit margin held steady, in fact, and operating margin spiked.

Target was forced to take losses on previously popular merchandise categories, like TVs and outdoor furniture, as consumers tilted demand away from those areas. Yet BJ's spacious warehouse environment minimized that inventory risk.

Costco likely benefited from the same flexibility.

Membership benefits

BJ's also affirmed its wider 2022 earnings outlook in stark contrast to Walmart (WMT -1.23%) and Target. The retailer is seeing inflation pressure in some categories, to be sure. And demand is tilting toward more staple products. But its transportation and inventory costs appear to be under control. BJ's profits are cushioned by its steady membership fees, too.

Costco is even better positioned to minimize these issues. It invested in its own fleet of freight ships last year, for example, and has a great relationship with some of the world's biggest merchandise suppliers.

Costco also enjoys industry-leading membership renewal rates. And most of its income, unlike in the case of Walmart and Target, comes from those subscriptions rather than product sales.

It's true that today's inflationary environment might make it harder for Costco to raise those membership prices, which are nearly due for an increase. But BJ's operating update this week suggests that the industry leader might not suffer from the type of earnings hangover that many of its peers are facing right now.