A chart is a graphic representation of data from multiple records of an entity. Charts interact with the views and filters which are currently applied to the view and a chart is refreshed each time you change your view.
SCENARIO:
Let us see how to remove decimals using custom label format into CRM chart Xml.
NAVIGATION STEPS:
Step 1: Navigate to Advance Settings -> Solutions -> Entity.
Step 2: Click on Charts -> Click on the chart which you want to edit.
Step 3: Export the Chart a Xml file will be downloaded.
Label Formats:
0 -> Zero placeholder. Shows all digits incl. zeros.
# -> Digit placeholder. Shows all digits except zeros, unless the zero is significant.
. -> Decimal point
, -> Thousand separator and number scaling
; -> Section separator
Examples:
LabelFormat =”#.##” -> .3
LabelFormat =”0.00″ -> 0.30
LabelFormat =”#,#,,” -> 3
LabelFormat =”#,#,,.##” -> 3.46
LabelFormat =”#,#,,.###” -> 3.457
LabelFormat =”#,#,.#” -> 3,456.9
LabelFormat =”#,#,,.##” -> .46
LabelFormat =”#,0,,.###” -> 0.457
LabelFormat =”#,0,.#” -> 456.9
Add Text or Characters
LabelFormat=”$#,#,,M” -> $3M
LabelFormat=”$#,#,,.##M” -> $3.46M
LabelFormat=”$ #,#,, M” -> $ 3 M
Sections
- 1st section -> Positive Values
- 2nd section -> Negative Values
- 3rd section -> Zero Values
Example
Positive value is displayed with two decimals, negative values are in a parenthesis, and zero values are just a single zero.
LabelFormat=”#,0.00;(#,0.00);0″
Currency
If you do not need to scale the number, you can use “C” followed by a specifier to indicate the number of decimals. If you do not add a specifier, decimals will be the same as the default in your CRM.
LabelFormat=”C” -> Currency with default decimals
LabelFormat=”C0″ -> Currency with no decimals
LabelFormat=”C3″ -> Currency with 3 decimals forced
Step 4: Insert the Label Format in the chart XML.
- If the IsValueShownAsLabel= “True” not present already, then insert it as well.
Step 5: Save the Xml file.
Step 6: Import the Chart in CRM
Step 7: Choose the Xml file and Click on Import
Step 8: Click on Replace to overwrite the existing chart.