The last few years have sent department stores into a bit of upheaval. 

Onetime clear leaders have stumbled while venerable brands have been pushed to the brink. Some of this uncertainty can be blamed on the Internet and the rise of digital retailers, but in some cases the companies themselves bear the blame. 

It used to be enough for a store to be conveniently located and offer a decent selection and reasonable prices. Now stores must not only compete with the convenience of online retailers such as Amazon.com (AMZN -1.65%), with its low prices and two-day shipping, they must battle new problems. From data security to protests over employee wages to simply staying relevant in a fast-changing word, both Target (TGT -0.54%) and Wal-Mart (WMT 0.57%) have faced challenges to their long-term success.

How those companies handle those issues will determine both their short-term stock price and their prospects for growth.

Getting past the data breach
Target has built its business by being a lower-priced department store that sort of transcends that status by selling merchandise with high perceived value. Like Starbucks or Chipotle, Target has built up a level of trust with its customers. However, that trust was rocked in late December 2013 when the company suffered a data breach that compromised the credit card numbers of tens of millions of Target customers. The company explained what happened on its website.

In mid-December 2013, we learned criminals forced their way into our system, gaining access to guest credit and debit card information. As the investigation continued, it was determined that certain guest information was also taken. The information included names, mailing addresses, email addresses or phone numbers. We have partnered with a leading third-party forensics firm who is thoroughly investigating the breach.

The data breach sparked a period of change for the company. In addition to having to win back the confidence of its customer base, the retailer changed CEOs and shuttered its Canada operations. It was a time of upheaval at a company that built its business on being steady, reliable, and familiar.

At the time it was hard to know the degree to which the data breach would impact business, or how long the affect would last. Fortunately for the chain, customers appear to have shaken it off: Sales, which had dipped, are now moving back in a positive direction. 

The company reported a wealth of good news in its first-quarter earnings report.

  • First-quarter adjusted earnings per share of $1.10 exceeded the company's expected range of $0.95 to $1.05. Target now expects full-year 2015 adjusted EPS of $4.50 to $4.65, compared with the prior guidance of $4.45 to $4.65.
  • First-quarter comparable sales increased by a better than expected 2.3%, driven by growth in both transactions and basket size.
  • Digital channel sales increased by 37.8%, contributing 0.8 percentage points to comparable sales growth.

Having a reserve of goodwill served Target well. As the chart below shows, its stock dipped during the end of 2013 through much of 2014, but has rocketed back.

Source: YCharts.

A confluence of problems
Wal-Mart might be the one major retailer that benefited from the recession. When price was the key factor driving American shoppers, it was easy for people to overlook the big-box chain's faults faults. The company has also had its share of problems, including joining McDonald's at the center of the minimum wage debate. None of this has really affected U.S. sales dramatically (they increased in the first quarter by 1.1% while foot traffic was actually up), but uncertainty has driven the company's stock price down.

Source: YCharts.

In some ways Wal-Mart is being punished not for its results but because it is being challenged on so many fronts. The company faces stiff competition from Target and Amazon, which are perceived as selling higher-end goods. Wal-Mart has also been forced to raise wages for employees, which should ultimately be a positive if it helps change public perception of the company.

To revive its stock, Wal-Mart needs to walk a fine line. It must improve the shopping experience in its stores and address the wage issue without impacting costs. The company's niche is in offering inexpensive merchandise, and it needs to keep doing that, but in cleaner stores staffed by better paid employees.

At a time when fewer people have to go to Wal-Mart, the chain needs to make more consumers want to shop there. That's a very difficult needle to thread, which puts the company in a challenging position. Wal-Mart will have a customer base as long as we Americans struggle to pay their bills; but until the company exacts some real change its fortunes may grow or sink in an inverse relationship to how the public perceives the economy.