Count the number of items for a column by using the SharePoint Chart Pivot

Applies to: Nevron Chart for SharePoint (WSS3.0, SharePoint 2007/2010/2013)

How to count the number of items (count of rows) for a column by using the SharePoint Chart Pivot?

Let’s say that we have the sample SharePoint list below. We would like to count the number of items for the "Initiative Type" column and display it in a Pie Chart.



For the Pie Chart, we will also show the percentage for each item from the total and the actual item count as tooltip.



1. Through the Chart Designer - Data Source tab, you can connect to the SharePoint list. Then select Pie chart type from the Chart tab:



2. From the Pivot tab, Data Groupings >> Categories – we have dropped the Initiative Type from the DataSet Fields (=Fields!Initiative_Type):



3. In the Data Groupings Values tab, we have created a value and for the Value filed and we have used the following expression: =Fields![RowCount]
For the Label field, we have used the following expression: =Fields!Initiative_Type



4. In the Data Groupings >> Values >> Data Labels – we have set labels to visible and Format: <percent>



5. For the Legend (in the Data Groupings >> Values >> Legend), we have used Format: <label> which comes from step 3 above:



6. To show the actual count of the items for each pie slice, we can use tooltips.
In the Data Groupings >> Values >> Action tab, for the Tooltip field we will use the following expression: =SUM(Fields![RowCount])



7. To configure the Pie Chart in 3D, from the Chart tab >> Chart Areas >> Effects, we have used the following properties:



For more details, take a look at the Nevron SharePoint Vision Online Documentation:
Pivot Engine > Expressions
Pivot Engine > Variables

Article ID: 166, Created On: 1/7/2011, Modified: 1/29/2013