Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to create calculated or rollup field

Posted on by 2,645

I am on the opportunity form and have a subgrid that is tied to the employee entity.  In the subgrid I have a column called Yes/No.  This Yes/No field is also on the Employee form.  Now when a user adds employees to the subgrid on the opportunity form, I will be able to see yes or no in the Yes/No column.  From here, I need to make a calculated or rollup field that would look at the subgrid and see how many records in there have Yes.  Then another calculated/rollup field where it says No.  Then I need another field that would be for % of all employees in the subgrid that have "Yes"

I tried a rollup field, the employee entity doesn't show up under related entity.

How can I do this?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: How to create calculated or rollup field

    Quoting "Define Rollup Fields":

    A rollup can be done only over related entities with the 1:N relationship. A rollup can’t be done over the N:N relationships.

    So Rollup Field is not applicable in this scenario.

    I would recommend developing the plugin that will handle Associate/Disassociate message and update related opportunity.

  • USA80 Profile Picture
    USA80 2,645 on at
    RE: How to create calculated or rollup field

    Its a N:N relationship

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to create calculated or rollup field

    Hi USA80,

    You mean you don't see the related entity -employee in the places marked in the picture below, right?

    pastedimage1622786352016v1.png

    And employee is a custom entity? It is a N:1 relationship with the opportunity entity?

    A rollup can only aggregate values over related entities with the 1:N relationship.It can’t aggregate over the N:N relationships.

    Also, you should be aware of certain conditions and restrictions when working with rollup fields,which may also be the cause of the error.

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-rollup-fields#rollup-field-considerations 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans