It turns out that in Vegas, the house doesn't always win.

Nevada's casino industry lost $662 million last year, and has been in the red consistently for six years. Things hit bottom in 2009 when the industry posted a staggering loss of $6.8 billion.

It's not that casinos don't bring in plenty of cash. Nevada's 271 casinos collected a hefty $24.6 billion in fiscal year 2015 (which ended June 30,) according to the state's Gaming Control Board. That's up from $21 billion in revenue for 2010.

The problem: Visitors are spending plenty on restaurants, booze and glitzy shows featuring Jennifer Lopez, Britney Spears and magician Criss Angel. But spending on actual gambling is way down, according to Mike Lawton, senior research analyst for the Gaming Control Board. And if people aren't gambling as much, that means they're not losing as much.

Related: More Atlantic City casinos may close

"The Strip is at an all-time high in revenue," he said, driven by hotel rooms, the second biggest spending category behind gambling, as well as retail and entertainment. "But gaming is lagging. That's why we're losing money."

It's a trend that began with the Great Recession in 2008.

Related: Steve Wynn: Macau casino crackdown 'preposterous'

"More people are coming to Vegas, but they're spending differently," said Lawton. "Basically, gaming (revenue) hasn't quite caught up and non-gaming is leading."

The good news is that the industry's losses have been narrowing every year, and Lawton is optimistic that the Nevada casino industry will start making money again this year. He said that Vegas expect to have 42 million visit in 2016, which would be a record.