The pandemic-era boom for retailer Target (TGT -1.20%) is starting to unwind, although some of the company's biggest wins are still delivering. The company reported a 5.4% decline in comparable sales in the second quarter. Food, beverage, essentials, and beauty performed well, while discretionary categories struggled.

While Target's bottom line improved dramatically from last year when the company was taking drastic action to reduce inventory levels, the company nevertheless slashed its outlook for the full year. It now expects a mid-single-digit decline in comparable sales for the rest of the year, and adjusted earnings per share should come in between $7 and $8. That's down from a previous range of $7.75 to $8.75.

While shares of Target rose following the second-quarter earnings report, the stock remains down about 60% from its pandemic-era high. Should investors bet on a turnaround?

Convenience is still a winning formula

Sales were weak in Target's stores and online in the second quarter. Comparable-store sales dropped 4.3%, while comparable-digital sales slumped 10.5%. But there was a silver lining.

Target's same-day services remained popular as customers gravitated toward convenience. Same-day services grew by 4% year over year, with Target's curbside pickup service reporting 7% growth. These services boomed during the pandemic, and Target's customers aren't changing those habits now that it's over.

The company is looking to further boost the popularity of curbside pickup by adding the option to include drinks from in-store Starbucks locations. Around 1,700 Target stores have a licensed Starbucks inside, and by early October, all these stores will support tacking on a Starbucks drink to a curbside pickup order. While this makes the logistics more complicated, it should make Target's curbside pickup even more attractive for customers.

Progress bringing down inventory levels

Target has sacrificed profits over the past year to clear out excess inventory. The company has largely succeeded in these efforts. Total inventory was down 17% year over year in the second quarter, and inventory of discretionary products was down 25% year over year.

While it makes sense that Target is shifting its product mix toward categories that remain in high demand, this strategy could backfire if customers fail to find the products they're looking for. This may be one driver behind the big decline in digital sales.

Inventory cuts, coupled with higher profits, have led to a greatly improved cash-flow situation. Target produced free cash flow of $573 million through the first half of 2023, compared with a loss of more than $2.5 billion in the same period last year.

A reasonable price, but mind the risks

I said back in June that Target stock was finally cheap enough to buy following its post-pandemic rout. While the company's profit outlook is now lower, that remains the case today. Based on the midpoint of Target's new earnings guidance, the stock trades at a price-to-earnings ratio of about 17.

Given the issues Target is facing, that's not a particularly cheap valuation. But Target is a good retailer going through tough times. The demand environment is seemingly out of its control, and it's doubling down on what's working, particularly the curbside pickup offering.

Still, rival Walmart is having no trouble growing sales, both in-store and online. Walmart reported U.S. comparable-sales growth of 6.4% in the second quarter, driven in part by a 24% jump in e-commerce sales. In a tough economy where shoppers put the focus on value, Walmart is clearly winning, and Target is clearly losing.

It's not unreasonable to bet on a turnaround for Target, but it's hard to parse how many of the company's problems are of its own making. A comeback may take a while.