Archive for May, 2013
In setups where both Users and Teams own records, it can sometimes be useful to group data by the owning Business Unit, rather than by the Users or Teams individually.
Most entities allow you to add an “Owning Business Unit” column in Advanced Find to take care of that, but some do not. Most notably the Activity entities, incl. Phone Calls, Appointments, etc. do not have this option. We can only get access to the “Owner”, “Owning User” and “Owning Team” from the UI. Regardless of which one we use, either we will get Teams separately from Users or we will only see the Business Unit related to either the Team or the User. This is also the case for the Opportunities entity.
Of course, the records still have an Owning Business Unit, and luckily, we can still call it in the chart xml directly.
Just copy the <link-entity> tags and the groupby attribute from a CRM chart xml that does support “Owning Business Unit” in the UI. Then use it to replace the attribute groupby line in your Activity chart xml.
Or just grab the code from here.
<link-entity name="businessunit" from="businessunitid" to="owningbusinessunit" link-type="outer"> <attribute groupby="true" alias="REPLACE ALIAS" name="name" /> </link-entity>
Just insert the alias from the original groupby attribute where it says “REPLACE ALIAS”.
Grouping directly by Business Unit allow you to see both User owned and Team owned records as one. That way you don’t have to create 2 charts or create multiple series that go through the “Owning User” and “Owning Team” fields to find the proper Business Unit.
Don’t forget to follow me on Twitter
Are we focusing on the right Accounts and Opportunities?
A common question in sales departments. Accounts are often classified in some kind of A, B, C categorization based on their potential value etc. Ideally, that means you sales activity should primarily be related to A accounts and some B accounts. However, a common setup in CRM, is to set your sales activities regarding an Opportunity.
So if I want to see if sales activities are focused on the right type of Accounts, I need a chart that show me all the Activities related to an Opportunity, but group the data by the A, B, C categorization on the Account. Something that is not possible in the MS CRM Chart Designer.
The tricky part here is that we now have two steps.
Activity -> Opportunity -> Account
Had we only had one step, it would have been fairly easy to do everything in the MS Dynamics CRM Chart Designer. For example, if you wanted an overview of your Est. Revenue in Opportunities based on the type of Account, all you need to do is add the field from the Account entity, to your Opportunities View in “Advanced Find”, save the View, and then use it when you open the chart editor. Thank you to Adam Vero for having brought that very helpful shortcut to my attention.
Since our scenario has two steps, we can’t use this trick. However, we can get Advanced Find to do the most of the dirty work.
In Advanced Find, from the Activities entity, create a filter that goes to the Regarding (Opportunity), to the Potential Customer (Account) and check if the desired field, Classification, contains data.
Save the View and download the FetchXML for later as it contains the needed link information in xml format.
Next I’ll create a chart in the chart editor that I can use as a base for my new chart xml. I want my final chart to be a pie chart grouped by the Account classification. Since I need to add that link in the chart xml, I’ll create a similar chart and use another field as a placeholder.
In this case the field “Priority” is the placeholder for the A, B, C classification.
I’ll export this chart and now I’ve got the pieces I need.
First I’ll take what I need from the FetchXML I downloaded from Advanced Find..
Highlighted are the needed lines with the <link-entity> information from Activity -> Opportunity -> Account, as well as the schema name for the Classification field, which we want to group by. We do not want to keep the filter information in this case.
Now that I have the link information, I’ll open the Chart XML and locate the groupby attribute line in the fetchcollection part.
I want the <link-entity> tags from the FetchXML to surround this groupby attribute line. Then the placeholder, the prioritycode, should be replaced with the “accountclassificationcode” from the Account entity.
Final version should look like this.
Import it back into CRM and use it on a View that only show Activities related to an Opportunity.
Hopefully that’ll get you a little closer to knowing if your Sales/Opportunity time is spent on Accounts that are worth it. In this case, more time is spent on B-Accounts than A-Accounts.
So, how many nested <link-entities> can CRM handle? Well, you can go at least 4 entities out. Beyond that, and probably sooner, you’ll hit a point there the chart just doesn’t make sense any longer.
Depending on the volume of records, this is an area where you can tell that these charts load a little slower. Only a few extra seconds, so enough to be noticeable, but it shouldn’t impact usability.
Thanks for reading and please follow me on Twitter
You are currently browsing the archives for May, 2013
- Prefilter data for Power BI with OData URLs
- Setup the Data Export Service with a Power BI Solution Template
- Power BI and mixed Team/User Ownership in Dynamics 365
- Time to expand the scope of the CRM Chart Guy blog
- Crowdsourcing the ultimate Sales Dashboard for Dynamics 365/CRM
- Custom Date Formats in Charts in MS Dynamics CRM
- Charts on Forms, or User/Account Specific Dashboards
- Charting on Activity Parties in MS Dynamics CRM
- Bubble Charts in Dynamics CRM
- Funnel Charts Suck and You Shouldn’t Use Them
- Compare This Year to Last Year with a Dynamics CRM chart
- Annotations in MS CRM Charts
- Add Key Figures to Dashboards in MS Dynamics CRM
- N:N Relationship Charts in MS Dynamics CRM
- Add Percentage Labels to a 100% Stacked Bar chart in MS Dynamics CRM
- Display only complete weeks or months in charts
- Is your “Regarding” field on activities set correctly?
- All things Pie Chart in Dynamics CRM
- Multiple entities in one MS CRM chart
- Create a Gantt Chart in MS CRM
- Count Distinct or Unique items in MS CRM Charts
- Design options for bar charts and Top X bar charts
- Advanced Campaign Performance Chart in MS CRM
- LabelFormat Cheat Sheet
- Groupby Business Unit – even when not present (i.e. Activities/Opportunities)
- Groupby on a related entity’s related entity
- Everything ScaleBreak in MS CRM 2011 Charts
- Aggregate Total on top of Stacked Column Charts or Bar Charts in MS CRM 2011
- Removing Axis Titles, Legend and Axis Labels in CRM Charts for MS CRM 2011
- Specify Exact Colors for Each Priority in the Microsoft Dynamics CRM 2011 Case Chart
- Add insight to your pipeline with Advanced Goal Charts
- Include records with no value in charts!!!
- Using Custom Colors in Charts
- Order data based on a linked entity
- Order (or Sort) your charts
- Axes modifications – Part 1
- January 2017
- December 2016
- November 2016
- September 2016
- January 2016
- November 2015
- October 2015
- June 2015
- March 2015
- November 2014
- October 2014
- August 2014
- March 2014
- February 2014
- January 2014
- December 2013
- September 2013
- August 2013
- June 2013
- May 2013
- March 2013
- February 2013
- January 2013
- August 2012
- July 2012
- Activities chart
- Aggregate Total
- Bubble Chart
- Campaign Chart
- Case Chart
- Charts on Forms
- Colors in charts
- Count Distinct
- Display Zero Values
- Filter in chart XML
- Funnel Chart
- Gantt Chart
- Goal Chart
- Multi-entity charts
- Multiple Series
- N:N Relationships
- Order charts
- Pie Chart
- Power BI
- Related Entities
- Sales Charts
- Sales Dashboard
- Week Chart