When a company isn't profitable, P/E can't be calculated. Price-to-sales steps in: what you pay for each dollar of revenue.
It's blunt on purpose. A dollar of software revenue is worth far more than a dollar of grocery revenue, so P/S only works within an industry.
Very high P/S ratios are the classic signature of hype: the market is paying for revenue in the hope profit follows. Sometimes it does.