Roll Up Custom Field - Portfolios

Hi Larry

Just to ensure I understand this correctly, the roll up custom field in the project portfolio will add up all cost fields in a projects tasks?

As long as the cost field is set to global in project.

So if I have three tasks in a project each with a cost field of $500, the roll up custom field in the portfolio should show $1500?

Many thanks

Alex