Walmart has higher prices and less selection in Canada vs the US, but that hasn't stopped them from being successful here. Walmart too had a rough (though not catastrophic) first couple of years in Canada, but they're doing fine now. Well, aside from their attempt to bring Sam's Club here, which they abandoned after failing to break Costco's hold on that market segment.
The biggest problem were the empty shelves. Nothing is as customer-repellent as empty shelves. When a customer goes to a store and is unable to get what they expected, that store effectively trains them to shop elsewhere, and undoes all their marketing and advertising in the process.
The second problem was the perception of price, or that it was ever their main focus. Target's main draw in the US isn't that it's the cheapest place to shop, but rather that they have better merchandise. It's hard to beat Walmart on price, but it's very easy to beat them on style. In addition to nicer private label products, Target has, or used to have, exclusive products which were both quite stylish and affordable, like designer clothing and household products. Unfortunately, their entry into Canada coincided with them backing away from this approach even in the US (which I would expect is what led to them having some troubles at home), and what little they did do didn't make it to Canada. Without product exclusives and bereft of merchandise, they simply had nothing to offer Canadians that competitors didn't do better.