Shares of Target (TGT -0.54%) fell by about 3% on Monday May 5, 2014 after the big-box retailer announced that Greg Steinhafel would no longer head up the company as its CEO. This move marked the second high-profile departure related to the data breach at the retailer, as CIO Beth Jacob left the company back in March. However, the data breach just added to the problems that Steinhafel faced at Target. A problematic expansion push into Canada and competition from other retailers have also hit Target's results. As a result of this, Target posted mixed results for the fourth quarter while its competitor TJX (TJX 1.20%) posted much stronger results for the period. 

Target's recent results
Target ended 2013 on a weak note, both domestically and in Canada. In its last earnings report, Target announced that its fourth-quarter sales fell 3.8%, although full-year sales still showed a small rise of 0.9%. Target's gross margin for the quarter in its domestic operations also narrowed from 27.8% to 27.6% year-over-year, although the full-year gross margin actually showed a minor gain rising from 29.7% to 29.8%. With the heavy price promotions going on at many retailers during the 2013 holiday season, this actually looks impressive as Target did not take a huge hit to its margins for the period.

These figures show that even though the last quarter of 2013 didn't go too well for Target, it wasn't a total catastrophe as the retailer still managed to show small gains on two important metrics for the year. Target's diluted earnings per share fell more sharply for the year from $4.52 to $3.07, although most of this stemmed from the $1.13 per share impact of Target's Canada push. However, the retailer still retains some powerful competitive advantages.

The case for Target
Target sells competitively priced  but attractive clothing, appliances, household decorations, food, and many other things. While it doesn't always have the inventory selection of a category killer, it usually has an inexpensive item available to satisfy most needs. The company can use price competition to beat higher-end retailers, and its design and fashion appeal can help it beat deep discounters. In addition, the company has also expanded its food lineup by adding fresh groceries. Wal-Mart and the dollar stores also see fresh groceries as a promising growth area. Target also has international expansion potential, even if its Canadian launch didn't work out as well as it expected. Also, Target isn't the only discounter that's lost data to a hack.

TJX also got hacked several years ago
The Target data breach also brought attention to another big retailer that sells cheap clothing and household goods. Back in 2007, TJX reported that it had suffered a similar breach. The breach at the TJ Maxx parent may have been an even bigger breach than what Target reported, depending on the calculation method used. Hackers stole the payment card data of about 45 million customers from TJX, while about 40 million customers had their payment card data stolen at Target. However, hackers got away with personal information on a much wider group of Target customers, and this brought the number of people affected by the Target breach up to 110 million. This figure got a lot of attention because it meant that the breach affected about one out of every three people in the United States.

TJX has recovered
The fiscal 2014 results from TJX show that shoppers have forgiven the company.Even with one less week in the year, TJX still posted 6% annual sales growth for fiscal 2014. TJX also reported 3% comps growth for both the year and the fourth quarter. The company saw its comps rise across three of its four segments as well, although its comps for Canada came in flat after a 5% rise in fiscal 2013. This may indicate that economic conditions in Canada contributed to Target's poor performance to some extent. TJX has also established a presence in Europe, where its comps rose 6% for the year after a 10% gain in fiscal 2013.

Foolish takeaway
The results from TJX show that a retailer can recover from a massive data breach if it has a concept that resonates with customers. Even with flat comps in Canada, TJX is still seeing international growth from its operations in Europe. TJX also sells competitively priced but fashionable products, its peer's main attraction, and its results may even indicate that it's attracting customers away from Target. Even if conditions do get better at Target, TJX looks like the better buy right now.