Dollar-store chains were once thought impervious to Wal-Mart because of their rock-bottom pricing, but as they've expanded their selections, the retail king is more of a threat than ever. Image source: Mike Mozart via Flickr

Well, that's not how it was supposed to work out. Both Dollar General (NYSE:DG) and Dollar Tree (NASDAQ:DLTR) have been among retail's brightest stars post-recession as consumers struggled to regain balance, but both just reported second-quarter earnings that came up well short of analyst expectations.

As household incomes have risen in recent years, so have the fortunes of the dollar-store chains, which began broadening their assortment of goods to attract a wider demographic. It was a strategy that paid dividends as just this past summer, the market analysts at NPD Group found that about 29% of the millennials who shopped at Dollar General, Dollar Tree, and Family Dollar earned over $100,000 annually and accounted for about a quarter of sales. It was that segment of the population that Dollar General CEO Todd Vasos credited with becoming one of his chain's "core customers."

Penny-wise, pound-foolish?

Thus it was a surprise twist that Dollar General recorded same-store sales growth of just 0.7% in the most recent quarter, compared to analyst expectations that were nearly four times greater. Dollar Tree also came in below forecasts of 2.4% with comps of just 1.2%. Their stocks took big hits, with Dollar General tumbling 18%, and Dollar Tree falling 10%.

Management at both companies blamed a difficult retail environment and the impact of softer consumable sales driven largely by price deflation. In particular, Dollar General said key categories like milk and eggs, which saw prices fall 8% and 50%, respectively, were especially responsible for the hit as they comprise the largest component of its perishables selection. Dollar Tree also had to contend with assimilating Family Dollar into the fold.

Wal-Mart's makes a move

But the biggest reason these retailers may have fallen short was the decision by Wal-Mart (NYSE:WMT) to regain relevance. The buzzterm in use here is "price investment," which translates to lowering prices. Consumers had drifted away from the retail giant as its low-cost proposition became muddled, and Wal-Mart made a decision to aggressively invest in pricing. In many cases, it was once again the discount price leader.

In its conference call in May, Wal-Mart noted that "better expense management in the quarter gave us increased confidence to initiate our next phase of U.S. price investment earlier than planned. Over time, we intend to lower prices further in a deliberate, strategic way to drive our productivity loop."

Customers apparently responded, because Wal-Mart reported a near-3% jump in sales as comps rose for the eighth consecutive quarter on seven straight quarters of higher traffic.

It speaks to a phenomenon the market researchers at NPD Group recently covered, which is that there's apparently little loyalty among discount shoppers. NPD looked at TJX Companies (NYSE:TJX) shoppers and found they were willing to go where the best deals were, regardless of who had them. Financially strapped customers would simply shop wherever prices are lowest to make their dollars go further.

Dollar General and Dollar Tree have done yeoman's work in expanding their product selection, including adding more name brands and a greater assortment of fresh produce, but it looks like Wal-Mart's ability to kill any category is proving a harder fight than they might have anticipated. The dollar-store chains may also find themselves needing to adjust to the growing presence of bare-bones European grocery chains like Aldi and Lidl that seek to expand their presence in the U.S.

Still islands of safety

Although analysts also believe may be encroaching on Dollar General and Dollar Tree, their relative immunity to the e-commerce leader seems to still be intact. Fill-in shopping trips and the treasure-hunt nature of a dollar store would suggest any real threat from etailers is precluded at the moment.

But Wal-Mart is enough of a threat as it is, and should this trend persist, the dollar stores may need to come up with a new way to compete against the retail king since price alone may no longer afford them any protection.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.