Retail sales were up in June, according to the Commerce Department, but not as much as everyone had expected. The increase is good news, but the change in the rate of the increase is bad news. You can add it to the pile along with accelerating factory growth, a rise in new home furnishing sales, and all the other economic news that's been swirling this year, and then you can draw your own conclusions about how a 100,000-employee company uses that information to do anything other than stare at one another in a boardroom.

Last week, a few companies announced that they had managed to succeed in June, even in the swirling winds of the global economy, but those companies are the outliers. Luckily, outliers are good news for investors.

The common thread of success
The thing that holds the winners together isn't price, demographic, or region -- it's understanding. Understanding that their businesses target a specific kind of person, and that that person is affected in a different way than all the other people in the world when things get bumpy. Maybe they spend more, maybe they spend less, maybe they go online, but something changes, and anticipating that change is the only way to succeed.

Instead of looking for companies that are poised to take advantage of the next big swing, investors have been winning by looking at companies that don't care what the next thing is but know what their customers want.

On the apparel side, Gap (NYSE:GPS) rocked a 7% increase in comparable sales -- sales in stores open for more than a year -- over June. The leader of the pack was Old Navy, which had an incredible 13% increase in comps in June, due to the company's strength of brand. What Gap understands is that its customers want reliable, consistent, and branded products. By hitting those key drivers, it can keep demand high, reacting to price pressure through small promotions instead of widespread discounting.

In the broader market, Costco (NASDAQ:COST) proved itself again by showing that it, too, understands what its customers want. The company increased its comparable sales by 6% across the board. It kept its foot on the gas, bringing in customers who are looking for good prices on merchandise. By keeping its overhead costs low and delivering consistent experiences across the country, Costco has been able to keep customers interested, even as economic conditions flounder.

Falling behind
If there's a lesson for companies to learn here, it's that consistency means a lot to consumers. If everything is going crazy, we often turn to the familiar to comfort ourselves -- and shopping is no different. Contrast the success that Gap and Costco have had with the lackluster flatlining over at L Brands (NYSE:LB). The company had no change in comparable in-store sales in June, and online sales of Victoria's Secret fell 9%. L Brands has had a hard time keeping customers interested, and its comparable sales have been up and down as a reflection. Because it has had seasonal flops, it's been forced into promotional activity that throws consumers off, and as a result, it can't give its customers the experience that they expect.

Inconsistent sales result from inconsistent portrayals -- that rhymes, so you know it's true.

The bottom line
We're still reeling from all the economic confusion, and the folks leading the way seem to be pulling us in all kinds of different directions. Companies that can offer some solace from the chaos are going to do well, as Gap and Costco have highlighted. While branding has always been important, it's never been as valuable as it is right now.

Fool contributor Andrew Marder has no position in any stocks mentioned. The Motley Fool recommends Costco Wholesale. The Motley Fool owns shares of Costco Wholesale. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.