How does an iconic brand survive in a dying industry that is faced with a disappearing customer base? That’s the question facing department store operator Macy’s (NYSE: M), which seems to be at the center of the perfect storm of changing economic conditions, devastating American retail.

If you make a list of all the troubles facing American retail today, Macy’s seems to have them. It operates large stores in malls, which leads to high labor costs and falling foot traffic. Income inequality and falling wages are depriving its middle class customer base of disposable income. Aggressive discounters like Amazon.com, Costco, and Target are undercutting its prices. Online retailers are offering low prices and the convenience of shopping at home.

Despite all that, Macy’s has remained profitable, but it is also on shaky ground. The financial numbers indicate that the company has dodged the bullet, but some serious problems loom on the horizon.

Macy’s is Doing Surprisingly Well

Macy’s has done surprisingly well for a department store operator in today’s retail environment.

On Oct. 31, 2015, Macy’s did report some impressive numbers, including an earnings per share number of 3.818, a net income $1.321 billion, a profit margin of 2.01%, and revenues of $27.57 billion. Investors were even rewarded with a dividend yield of 3.44% and a return on equity of 26.69%. Digging a little deeper, we notice that Macy’s reported $2.146 billion in cash from operations and $474 million in cash and short-term investments for the third quarter.

These numbers show us that Macy’s is holding its own, but there are some worrying signs at the retailer, the most bothersome of which is free cash flow, which was -$449 million on Oct. 31, 2015, a figure that points to some serious losses.

Macy’s Business is Falling Off

Even more bothersome is the revenue, which has started to decline after impressive gains a few years ago. Macy’s reported a TTM revenue of $27.94 million in October 2014 that fell to $27.57 billion a year later. That’s a decline of $370 million, which could be made up for with a good holiday season.

A far scarier number is Macy’s cash from operations. In October 2014, Macy’s reported generating $2.571 billion in cash from operations during the third quarter. That number fell to $2.146 billion, which means Macy’s had $425 less cash it had just a year earlier.

Is Macy’s in the Death Spiral?

These numbers show us that the company’s day-to-day operations are not leading to sustained revenue growth. To make matters worse, the amount of cash generated by day-to-day operations is falling dramatically, which is an early symptom of the death spiral.

The death spiral occurs when a retailer is not bringing in enough cash on a day-to-day basis to pay for its operations. When it occurs, a company like Macy’s can go down fast because it can cover the cost of merchandise bought on consignment plans.

These numbers explain why Macy’s has decided to close 40 of its 770 stores and effectively pull out of some areas. To survive, the company needs to either dramatically reduce costs or increase revenue. Since revenue is not likely to go up, soon it has to cut costs by closing stores.

Is Macy’s a Profitable Niche Retailer?

The numbers seem to indicate that Macy’s could be a profitable niche retailer, catering to a more upscale clientele much like Nordstrom (NYSE: JWN) does. The numbers show us that department stores seem to have a future if they cater to the affluent upper class.

Nordstrom’s cash from operations shot up dramatically over the course of the year, rising from $1.266 billion in June 2015 to $2.44 billion in October 2015. Nordstrom’s revenues also shot up from $13.17 billion in October 2014 to $14.29 billion a year later.

Therefore, department stores are not a dying industry, but their market is far smaller than it once was. Instead of being mass retailers, department stores now cater to specific niche markets, for example, upper class women. Nordstrom succeeds by catering to a specific niche, people affluent enough to pay for a high quality shopping experience.

Macy’s Dilemma

Macy’s faces the twin dilemma of a customer base that is pressed for both time and money. Today’s soccer mom lacks the time to visit a department store because of her work and family obligations and she increasingly lacks disposable income.

Amazon (NASDAQ: AMZN) solves both problems by offering both low prices and the convenience of shopping from home. That also explains why Amazon is growing like a weed while Macy’s is closing stores.

To be a successful niche retailer, Macy’s would have to greatly reduce its store count. Unfortunately, it is not clear the chain could do that without and maintain the cash flow it needs to successfully compete in ecommerce. Therefore, investors should stay away from Macy’s; department stores seem to have a future, but this iconic brand name might not. This brand might survive, but it faces revenue and cash losses for the foreseeable future.