Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to copy a calculated field and then use it to sum (using rollup field) in a different entity form?

(0) ShareShare
ReportReport
Posted on by 10

Hello!

I've created a calculated field in each of the lines Orders entity and then I need to use each one of these fields in the Invoice entity and add them using a rollup field.

Please your advice with this topic.

Regards,

Nicolas

  • Nhead Profile Picture
    10 on at
    RE: How to copy a calculated field and then use it to sum (using rollup field) in a different entity form?

    Thanks for your answer Leah Ju.

    For the Orders entity I've created a rule to copy de calculated field in a new field (in the same form) and then use these results in the Invoice entity rollup field. But the problem is that the Orders entity has many lines (I upload the information using an Excel file) and I have to enter line by line to update the rule output field in order to be effective because the form doesn't refresh immediately.

    Do you know if there is a different and better solution?

    Kind Regards,

    Nicolas

  • Verified answer
    Community Member Profile Picture
    on at
    RE: How to copy a calculated field and then use it to sum (using rollup field) in a different entity form?

    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.

     pastedimage1610694115292v1.png

    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).

     pastedimage1610694740769v2.png   pastedimage1610694887017v3.png

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

    pastedimage1610696085838v4.png

    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.

  • IllerisJS Profile Picture
    40 on at
    RE: How to copy a calculated field and then use it to sum (using rollup field) in a different entity form?

    You do not. See community.dynamics.com/.../rollup-field-sum-calculated-field

    It is not possible to reference a calculated field from a rollup field.

    Alternative: use a PowerAutomate flow that triggers on order line and updates the above hierarchy ;-)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Adis Profile Picture

Adis 136 Super User 2025 Season 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 81

#3
Jonas "Jones" Melgaard Profile Picture

Jonas "Jones" Melgaard 77 Super User 2025 Season 1

Product updates

Dynamics 365 release plans