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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to calculate sum of values in N:N relationship

(0) ShareShare
ReportReport
Posted on by 10

Hi.

I have two entities, which relate by N:N relationship. Construction entity and Material entity. Material entity has field materialValue, and Construction entity has field constructionValue which is result of sum all related materialValue. I can not use rollup field for N:N relationship. May be anybody can help me and explain how I can do this? Please forgive me if I wrote too chaotically, but this is my first experience. 

I have the same question (0)
  • Verified answer
    Johnny Gong Profile Picture
    6,482 Moderator on at

    Hi Svetlanasyo,

    It's a little complicated since rollup field doesn't support N:N relationship. So you need to create a manual many-to-many relationship.

    Following article describes one example. When you create two 1:N relationships from the same entity in this manner, this can be described as a manual N:N relationship.

    And you could use the Intermediate transitional entity rollup fields to sum the materialValue field.

    community.dynamics.com/.../microsoft-dynamics-365-manual-n-n-relationship

    Hope above would help.

    Regards

    Johnny

  • Verified answer
    Javier Tafur Profile Picture
    60 on at

    This solution require a Workflow Activity, using a fetch with the agreggate sum.


    Check this links, if not are familiarize with this actions.

    Workflow Example https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/workflow/sample-create-custom-workflow-activity

    About the Fetch https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/use-fetchxml-aggregation

    Programming a workflow activity , you can get sum the materialValue after with a Update Record Step on a normal workflow to set the value on constructionValue.

  • Svetlanasyo Profile Picture
    10 on at

    Thank you very much :-)

  • Javier Tafur Profile Picture
    60 on at

    Hi, Svetlanasyo remember close this thread if the response was usefull  : )

    Best Regards.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 128 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 119

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans