Routinely Compare/Contrast Costs and Contributions to Portfolio Value
There cannot be a single, canonical answer to your question. Portfolio management is a discipline that intersects with project management, but is really more of a business concern than a project management one. Therefore, it is up to each business to define the metrics and key performance indicators that will enable decision-makers to evaluate trade-offs and resource allocations across an entire program portfolio.
The goal of any portfolio system is to distribute resources and risks across multiple projects. Some projects will succeed while others will fail. Portfolio management as a discipline involves itself with which programs to fund and routinely rebalancing resources across the project portfolio. When a project is under-performing, portfolio management enables organizations to reallocate resources within the portfolio, or to terminate unprofitable or unsuccessful projects altogether to make room for new projects.
How you determine which projects are adding value and which ones aren't will be specific to your company and your industry. More importantly, how you compare projects with each other will depend on organizational values and market conditions that are unknowable outside of your company. Treat it like any set of investments, and compare/contrast the costs and determine portfolio value in whatever ways advance the company's interests.