In my blog I make posts which relate to areas of CRM I’m currently working with or questions I’ve recently been asked. You might notice I’ve been making quite a few posts related to Unified Service Desk, having recently completed a large USD project.
Today I will answer a question someone in my company asked today.
They’d recently been creating a dashboard to show all sorts of information about cases resolved this week. But wanting to represent that data as a percentage. They’d realised that showing the information on a pie chart went someway to answering this but the labels on the chart showed a count of cases rather than a percentage.
So here is the answer …….
- Create a pie chart. (or use an existing one.)
- Export the pie chart.
- Edit the XML for the pie chart.
- Import the XML back to replace the exist pie chart.
Step One – Create a pie chart.
You may already have a pie chart that you wish to alter, if so great. If not you’ll need to use the chart design to create a pie chart. An example is below for my “Fishy Pie”. Notice how I’ve decided to show a sum of the quantity of fish by fish.
The resulting chart is below, I can now see the qty of each type of fish that I’ve caught. So I can see I’ve caught 251 bream etc. But what I can’t tell you is what percentage of the fish I’ve caught are bream. At least not without a calculator!
Step Two – Export the pie chart.
My next step is to export the chart, again this is done with the chart design. The export option can be found on the “…” menu. (See below)
When asked, save the file.
Step Three – Edit the XML
Now navigate to your downloads folder in file explorer. You’ll need to open the xml file you’ll find in downloads with a suitable editor. Notepad is fine for small changes like this!
Right click on the xml file and select “open with” then notepad. (See below).
Next you’ll see a screen something like the one below. Don’t worry! This change is simple and you don’t need to understand all the XML, or any of it for that matter. First off you’ll need to find the line that needs to be changes. I’ve highlighted it in yellow below. Your looking for “IsValueShownAsLabel”
Once you’ve found the line to change alter it like below. So replace IsValueShownAsLabel=”True” with IsValueShownAsLabel=”False” Label=”#PERCENT”
Save the file and your ready to import it back in.
Step Four – Import the XML back to replace the exist pie chart.
Using the chart design again in CRM select the import option. Hopefully you noticed this when you exported the chart!
Having clicked the “Import” button you will see a warning about creating a duplicate. If you want to keep you original chart select “Keep Both” but typically simply click “Replace”.
Finally you’ll, hopefully, get a message like the one below to say your import has been successful. At this point if instead of this you get a error message it will suggest you’ve made a typing mistake in the XML edit you’ve just done in Notepad. So go back and check it!
As soon as you click close you’ll see you chart change to contain percentages, like the example below. Notice how when I hover over with the mouse I can still see the qty of bream I have caught but the chart now tells me the additional information that 12.76% of the fish I’ve caught are bream.
Only problem being, I don’t like catching Bream!
Pingback: Charts – Grouping small values with “Collectedthreshold” | Microsoft Dynamics CRM and Unified Service Desk
Pingback: Charts – Grouping small values with “Collectedthreshold” - Microsoft Dynamics CRM Community
Pingback: CRM2015 Charts – Funnel Chart XML | Microsoft Dynamics CRM and Unified Service Desk
Pingback: Charts – Radar Charts | Microsoft Dynamics CRM and Unified Service Desk
Pingback: Charts – Pie Charts | Microsoft Dynamics CRM and Unified Service Desk
Pingback: Charts – Pie Charts - Microsoft Dynamics CRM Community
Pingback: Charts – Collection | Microsoft Dynamics CRM and Unified Service Desk
Very useful!! Thanks a million!!
LikeLiked by 1 person