Hi Nhead,
Rollup fields are only supported over related entities with a one-to-many relationship.
So you need create 1:N relationship between order line and Invoice entities, calculated fields in child records(order line) and rollup field in parent records (Invoice) in your scenario.

And as IllerisJS mentioned, “A rollup can't reference a calculated field that uses another calculated field”, which does not mean that all calculated fields are not allowed to appear in the summary field configuration, just not for the secondary calculated fields.
For example, calculate1 and calculate2 is a calculated filed from general fields, calculate3 is a calculated filed from another two calculated fields (1 and 2).

Now, go to rollup field configuration page, calculate1 and calculate2 fields can show in the list, but calculates3 field can't show.

you can refer it to know how to set rollup field: https://www.encorebusiness.com/blog/rollup-fields-in-microsoft-dynamics-365-crm/
If the calculated field you are using is the secondary calculated field, you can use js code to replace calculated field, which can use results in rollup field, you can refer my answer in the following thread:
https://community.dynamics.com/365/f/dynamics-365-general-forum/412845/roll-up-field-for-sum-of-decimal-numbers
Or you can provide more detailed information about it, so that I can give you more detailed solutions.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.