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 :
Microsoft Dynamics CRM (Archived)

Apply different filters on legend entries in chart using XML

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm trying to visualize the resolution time of cases over time and I'd like to show this graph for three different case priority levels. 
I made a quick visualization in Excel to clarify exactly what I want to make:

pastedimage1565345837481v1.png

I've been trying to apply filters to each of the different legend entries (with the help of crmchartguy.com/.../) but I haven't been able to get it to work.
My starting point is the xml code of the chart with three times the same legend entry (resolution time), see below. I've renamed the aliases to something easier to work with.

In summary, I'd like a different filter to be applied to each line in the chart, one with prioritycode="0" (low), prioritycode="1" (medium) and prioritycode="2" (high).
Any help with this would be very much appreciated!


<visualization>
  <visualizationid>{849E0676-2AB8-E911-A863-000D3AB0DC71}</visualizationid>
  <name>AA_Nina_Avg Case Resolution Time over Time</name>
  <description>Shows the average resolution time in minutes (Trend Line) along with the number of cases resolved (Column Chart) per day.</description>
  <primaryentitytypecode>incident</primaryentitytypecode>
  <datadescription>
    <datadefinition>
      <fetchcollection>
        <fetch mapping="logical" aggregate="true">
          <entity name="incident">
            <link-entity name="incidentresolution" from="incidentid" to="incidentid" link-type="inner">
              <filter>
                <condition value="1" attribute="statecode" operator="eq" />
              </filter>
            </link-entity>
            <attribute name="createdon" alias="groupby_column" groupby="true" dategrouping="month" />
            <attribute name="ai_resolutiontime" aggregate="avg" alias="restimelowprio" />
            <attribute name="ai_resolutiontime" aggregate="avg" alias="restimemedprio" />
            <attribute name="ai_resolutiontime" aggregate="avg" alias="restimehighprio" />
          </entity>
        </fetch>
      </fetchcollection>
      <categorycollection>
        <category alias="groupby_column">
          <measurecollection>
            <measure alias="restimelowprio" />
          </measurecollection>
          <measurecollection>
            <measure alias="restimemedprio" />
          </measurecollection>
          <measurecollection>
            <measure alias="restimehighprio" />
          </measurecollection>
        </category>
      </categorycollection>
    </datadefinition>
  </datadescription>



*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mick_4711 Profile Picture
    552 on at

    Hi Nina,

    maybe these chart options will help.

    forumhelp.png

  • Community Member Profile Picture
    on at

    Hi Mick,

    Thank you so much, that is exactly what I wanted!

    I feel very stupid for overthinking this so much, but at least my problem is solved now.

    Thanks again!

    Nina

  • Mick_4711 Profile Picture
    552 on at

    Hi Nina,

    Oh, no... This can happen to everybody.

    I'm glad your problem is solved now.

    Have a nice Weekend.

    Regards,

    Mick

    P.S.: Could please verify the answer as verified?

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans