Home Depot (HD 0.74%) isn't facing the type of painful growth slowdown that many investors had feared. That much is clear from the retailer's mid-November earnings update, which featured steady sales growth and strong profit margins.

But the announcement wasn't all good news. In fact, there's a warning sign in this report that could portend tough times ahead for Home Depot's earnings trends.

Let's take a closer look at that challenge, along with the main reason to like this stock in late 2022.

The red flag: Customer traffic

Home Depot announced only a modest growth deceleration in Q3, which was impressive considering that interest rates soared in the period and home sales trends cooled considerably. Comparable-store sales were up 4.5% in the core U.S. market compared to a 6% gain in Q2.

Yet all that growth came from higher prices and increased overall spending per visit. Home Depot logged a 4.3% drop in customer transactions this quarter, marking a worsening trend here compared to the prior quarter's 3% drop. The retailer needed a big boost in average spending -- 9% to be exact -- to keep sales trends moving in the right direction.

Home Depot benefited on this score by having a bigger presence in the professional contractor market. In contrast with do-it-yourself shoppers, this niche is continuing to spend more on real estate investments. That helps explain why Home Depot has outperformed peer Lowe's throughout the 2022 fiscal year when it comes to growth.

The green flag: Profitability

The good news is that Home Depot is striking a good balance between growth and profitability. Operating profit margin ticked up to 15.4% of sales this quarter despite huge new pressures, including higher transportation, wages, and inventory holding costs. Zooming out, Home Depot's operating profit is up 6% over the last nine months to modestly outpace its sales gains. It's hard to be bearish about a business that can expand profit margins in a slowing growth environment.

HD Operating Margin (TTM) Chart

HD Operating Margin (TTM) data by YCharts

That success allows Home Depot to continue investing in growth initiatives, such as improvements to its pro services. It also powers gushing returns to shareholders. Home Depot has delivered $11 billion to its owners so far in 2022, which is almost evenly split between stock buybacks and a growing dividend payment.

Those cash returns have supported market-thumping investor returns over the last decade. Home Depot has also significantly reduced its share count in that time, too, effectively amplifying shareholders' earnings.

Sure, growth trends could weaken into 2023, especially if the housing market enters a recession. But Home Depot has navigated through big cyclical downturns before and it has always emerged as a stronger business. Given that track record, investors shouldn't focus too much on short-term challenges around the business.

Home Depot is an excellent business, and the stock's decline in 2022 makes it more attractive to investors who value growth, efficiency, and dividend income. Consider putting Home Depot in your portfolio today.