A customer recently approached us with the following problem:
How can one Total (sum, average, Max, Min) a column of type Calculated in WSS v3/MOSS 2007? Standard SharePoint List Views doesn't provide this option for this column type -
So I did some research online and talked to my colleague Julie about the need and here is the fruit of my labor.
If you are looking to display the Totals in an existing List View, check out this blog article - http://www.endusersharepoint.com/?p=1106. I personally have not tried this but the response the comment section looks very positive.
Another option that I will be speaking about is using SharePoint Designer 2007 (reference as SPD for now on to save typing) to create a custom Data View and display the Totals there. By the way, did you know that SPD 2007 is now FREE! So let's get started. First go ahead and open SPD and navigate to the ASPX page you want to display the list view and Totals.
- Click Data View menu and select Insert Data View. A panel will appear on the right side of the screen called Data Source Library.
- Locate the Data Source (i.e. List) you want to display and drag it to the location on the page you want it to be displayed.
- Notice a menu will open called Common Data View Tasks
To modify the look and feel, including which columns you want to display, go to each link and configure it accordingly. I am not going to go through in great detail in this post all the features but most are self explanatory.
- Click on Data View Properties... In the Data View Properties window check one or more of the following options; Show view header, Show column summary row and/or Show view footer
depending on where you want the totals to appear. I personally prefer the Show column summary row because the row cells are in-line with the columns making it easier in keeping the professional look of Data Views. You will notice new row(s) appear in your data view as I have highlighted below:
- After enabling the appropriate rows, go Task Panes menu and select Data Source Details if not already selected. Example of Data Source Details is shown below
- Locate the Column you want to Total on. In my use case my column is called Sum of A and B which is a Calculated column. Click and drag the column to where you want to display it, in my case I am displaying the Total at the base of the Calculated column.
- After dragging it to the desired location, notice the "lightning bolt" box? If not, click on the displayed number where you dragged the column to and it should appear.
Click on the lightning bolt and a menu will appear
- Select the operation of choice and walla, you have just Totaled a Calculated column!
Easy wasn't it???
Apr 24 2009, 03:36 PM