Customers walk outside a Wal-Mart store in the Porter Ranch section of Los Angeles. REUTERS/Kevork Djansezian The heyday of big box discount retailers is over.

Consumers are becoming less interested in retailers like Wal-Mart and Target, according to a recent note by Goldman Sachs.

Instead, "consumers appear more focused on some combination of value and convenience," the analysts write.

The advent of online retailers like Amazon has also contributed to the problems at Wal-Mart and Target, according to the note. Consumers are less likely to make a trip to the stores when they could get free delivery online.

Wal-Mart's sales have declined for five straight quarters, leading to shakeups at the executive level.

Target's CEO left earlier this year amid disappointing sales results and a data breach that affected millions of customers.

Several sectors are benefiting from widespread lack of interest in Wal-Mart and Target, according to Goldman.

Dollar stores, drug stores, and warehouse clubs "are taking share from broad-assortment retailers," the analysts write.

While dollar stores have struggled recently, they have been a threat to Wal-Mart since the recession. Dollar Tree's acquisition of Family Dollar puts the retailers in a position to negotiate with suppliers for even lower prices.

Meanwhile, drugstores like CVS and Walgreens have spent years expanding their assortments to include groceries, high-end cosmetics, clothing, and accessories.

Costco's strategy of very low mark-ups and quality over quantity also appeals to consumers today.

Huge Wal-Mart and Target stores lack the convenience of smaller dollar chains and drugstores. They also can't offer the deep discounting of warehouse clubs like Costco.

The bank downgraded Wal-Mart's shares to "neutral" from "buy." Target remains a "buy" — but analysts still have reservations about the chain's tepid sales and steepening losses in Canada.

Goldman is concerned with Wal-Mart's current strategy, which involves international growth and investment rather than the quality core customers' experiences.

In the past year, Wal-Mart customers have complained about empty shelves in stores. The company has implemented a strategy to fix the problem.

To improve business, Goldman says, these retail behemoths need to adapt to accommodate changing consumer habits.

That includes investing in e-commerce and smaller stores, such as Wal-Mart's Neighborhood Market concept.

Wal-Mart's marketplace-style stores, with smaller store footprints and a focus on fresh produce and groceries, are widely regarded as the future of the brand.

The company also told Business Insider it is investing in e-commerce and omnichannel initiatives.

"We’re making investments in technology and our multi-format portfolio that will give our customers the resources to shop with us on their terms," the company said. "We’re focused on further growing sales by delivering an enjoyable customer shopping experience across all channels."