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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Group Column value in a Chart

(0) ShareShare
ReportReport
Posted on by

Hi,
I need to group a column value in a chart, for example i created a view that display a Subcategory column from a custom entity, I need to display those value in a chart but i need to group them category, ex : the column values are SUBA1,SUBA2, SUBC1,SUBC2. instead of displaying all those value in the chart i want to display CAT1 that group (SUBA1 and SUBA2) and CAT2 that group (SUBC1 and SUBC2).

of course the example is just to explain the issue

thanks

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    How many subcategories are there? And how many category groups are they in? (it matters because the most obvious option from a custom chart point of view will be horrible to build for large numbers of subcategories, and won't work for large numbers of category groups).

    Realistically, the most practical way to do this will be to add a custom field to the entity for "Group" or "Category", then update this using a workflow or plugin whenever the subcategory changes. Then it is trivial to build the chart you need, but importantly also makes it easy for users to use in Advanced Find, or building their own personal charts, or to drill down from category to sub-category, etc.

  • Community Member Profile Picture
    on at

    Thanks Adam,

    there will be 4 category, and maximum 3 sub category for each category.

    Thanks

  • Verified answer
    Community Member Profile Picture
    on at

    Since you have not said what your chart actually shows, let's assume you want to chart the count of records created per month, broken down by grouped categories as a stacked column.

    Create a chart with a series to count the records, using a "Count Non-Blank" criteria (I would always count the field with the same name as the entity, since this is the GUID field).

    Categorise this by created on date, grouped by month. Make this a stacked column chart. Add the same series three more times. Make sure they are all stacked columns.

    Save and export the chart XML.

    Now you need to add filters to those series, so that the first one only includes records in SubA1 OR SubA2 OR SubA3, the second series only includes SubB1 SubB2 etc - use Advanced Find and export the FetchXML if that helps you to build the syntax for the first one. You need to use a link-entity and filter on that (which is why you must use Count Non-Blank rather than a regular Count).

    Make sure to remove any references to a Secondary Y axis.

    Import your chart and test.

    This article help to walk through some of the mechanics of adding filters, albeit for a different reason:

    crmchartguy.wordpress.com/.../advanced-campaign-performance-chart-in-ms-crm

    (in this example, the Opportunity entity is charted, then filtered so that Estimated Revenue is used for Open opportunities, but Actual Revenue is used for Closed ones)

  • Community Member Profile Picture
    on at

    I am facing the similar issue. I have a data field in my data called payment status which has values like paid, Pay later, pending cheque payment, pending payment etc. I want to categorise it into paid and not paid. So that I can plot a graph of customers who has paid and not paid.

  • Community Member Profile Picture
    on at

    I am facing the similar issue. I have a data field in my data called payment status which has values like paid, Pay later, pending cheque payment, pending payment etc. I want to categorise it into paid and not paid. So that I can plot a graph of customers who has paid and not paid.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans