Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How do I count the number of child records on a parent and make a view out of the result?

Posted on by 221

I want to create a View that shows sales staff the Opportunities they have open that do not have any quotes attached to them. We're trying to bring greater visibility to the status of their opportunities.

Doing this doesn't appear possible using out-of-the-box Advanced Find filters.

*This post is locked for comments

  • f23fzf34ffavcz2t56 Profile Picture
    f23fzf34ffavcz2t56 221 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    You are the man, Prashant. That did it.

  • Verified answer
    PS Profile Picture
    PS 23,577 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    Hi

    Make your field searchable option from 'No' to 'Yes'; highlighted in the below screenshot. Once done, save and publish

    0005.1.PNG

    Now create your advanced find query.

  • f23fzf34ffavcz2t56 Profile Picture
    f23fzf34ffavcz2t56 221 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    Hi Mark,

    The field has been created and I can put it on a form but I can't add it to the filter criteria of the advanced find. Do you know why that is?

    14_5F00_17_5F00_17_2D00_Field_5F00_-Count-of-Quotes-of-Opportunity.png

  • Suggested answer
    TheMarkChristie Profile Picture
    TheMarkChristie 10,328 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    Hi

    This is a simple thing to do

    On the Opportunity Create a Roll up field to count the number of quotes

    51437.2.png

    Then Create a new or edit a current view and filter so that it only shows where the value of that field = 0

    51437.2.png

  • Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    Hi Prashant,

    Yes it does but I have been able to connect and do a lot with it using the OData connector with very little impact to data size.  It has been great so far and only using minimal (10MB) of size.  I think the approach is definitely worth reviewing.

    Thanks much!

  • PS Profile Picture
    PS 23,577 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    That's a good one Drew, but I Guess, POWER BI might require licensing based on data size

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    Hi,

    Prashant's answer is great and should help you but another suggestion here from a different approach is to leverage PowerBI to help you with this type of analytics.  You will be able to get much more deep analytics and look at many different types of situations utilizing this approach instead of creating a number of rollup fields.  You can add the PowerBI dashboards right into CRM Online (Dynamics 365) as well.

    powerbi.microsoft.com/.../microsoft-dynamicscrm

    technet.microsoft.com/.../dn708055.aspx

    Thanks,

  • Aileen Gusni Profile Picture
    Aileen Gusni 44,522 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    Hi f23fzf34ffavcz2t56,

    First of all, what is your CRM Version?

    If it is 2015 and above then you can use rollup field, do note rollup field is a field that can be seen by users through View as well..It has also condition to meet, example: only Active Quotes.

    So, it will calculate the number of Quotes then if it is null or zero, it means, the opportunities do not have any quotes attached to them.

    Yes, you are right, advanced find cant do this because it does not support "NOT IN" clause in the advanced find filter criteria.

    Otherwise, if you use CRM 2013 or lower then you should create a custom field that you need to auto-rollup calculation to update it.

    Hope this helps.

    Thanks

  • Verified answer
    PS Profile Picture
    PS 23,577 on at
    RE: How do I count the number of child records on a parent and make a view out of the result?

    Create a roll up field on opportunity, which should counts quotes. Add this field as a column on any opportunity view or create a new view with desired filters

    blog.sonomapartners.com/.../dynamics-crm-2015-calculated-and-rollup-fields.html

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans