Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

Charts with data from two different entities with one to many relationship

(0) ShareShare
ReportReport
Posted on by

Good Day, 

I have two custom entities, Participants and Engagements. The relationship i have on them is a one to many, where one engagement will have many participants. In the Engagement entity main form there is a subgrid of participants. This allows the person entering the information to add multiple participants to the single engagement. 

I would like a bar chart to show the number of engagements each participant has. I need help accomplishing this task as i am not getting to use related data in charts. 

Categories:
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Charts with data from two different entities with one to many relationship

    Hi,

    Yes, you need to delete the existing 1:N and keep the N:N.

    With respect to displaying the count of Engagements for a Participants, Out of box charts is not possible but you can achieve this by editing the chart definition. refer below links:

    crmchartguy.com/.../groupby-on-a-related-entitys-related-entity

    community.dynamics.com/.../178350

    Hope this helps.

  • Community Member Profile Picture
    on at
    RE: Charts with data from two different entities with one to many relationship

    [quote][/quote]

    Hi kale99,

    According to my understanding of your content, if the relationship of two entities is 1:N, so why can't each participant take part in different engagements?

    In my opinion, one Engagement may contain many Participants as you mentioned, but one Participant could also participate in many Engagements, the relationship of the entities should be N:N.

    If so, you need to create a new filed on Participants form and manually count the number of participants' participation.

    If my understanding is wrong, please kindly share more information to explain your requirements.

    Hope it helps.

    Best Regards

    Leo

    Hey LeoAlt,

    You are absolutely correct. the relationship is a N:N. i created an N:N relationship between the two entities ( Participants and Engagements ). should i remove the 1:N relationships that currently exist in this case ?

    is the correct way create the field in the form using subgrid views ? that seems to be the only way that i could add a participant to an engagement and see all the participants listed there and the same with engagements.

    there is no engagement entity in the set of fields available when trying to create the new count field. Any suggestions ? 

    Thanks for the help

  • LeoAlt Profile Picture
    16,331 Moderator on at
    RE: Charts with data from two different entities with one to many relationship

    Hi kale99,

    According to my understanding of your content, if the relationship of two entities is 1:N, so why can't each participant take part in different engagements?

    In my opinion, one Engagement may contain many Participants as you mentioned, but one Participant could also participate in many Engagements, the relationship of the entities should be N:N.

    If so, you need to create a new filed on Participants form and manually count the number of participants' participation.

    If my understanding is wrong, please kindly share more information to explain your requirements.

    Hope it helps.

    Best Regards

    Leo

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans