web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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

I have the same question (0)
  • IllerisJS Profile Picture
    40 on at

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

  • Verified answer
    Community Member Profile Picture
    on at

    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.

  • Nhead Profile Picture
    10 on at

    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

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Subra Profile Picture

Subra 127

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 97 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 87

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans