Posted tagged ‘totals’

Total Calculated Columns in SharePoint

July 22, 2008

Out of the box SharePoint does not allow you to create totals in a SharePoint view for calculated columns or calculated fields.

Here is a work-around to total a SharePoint Calculated Columns or the Calculated Fields. (Note this will also create subtotals when using Group By options in a standard list view.)

Let’s say we have a field called PROFIT that is a calculated field set to subtrack the expense field from the revenue field in our list. ([Revenue]-[Expense])

  1. Create a regular number field (or currency field) called TOTAL PROFIT (or any other name you want) in that list.
  2. Using SharePoint Designer create a workflow for your list that runs when list items are created and when list items are changed.
  3. The workflow will have only one step name it something like set TOTAL PROFIT.Leave the condition field blank.
  4. In the action section choose “Set field in the current item”.
  5. Click on the word “field” and choose TOTAL PROFIT (the name of our column).
  6. Click on the word “value” and click on the “fx” button to do a lookup.
  7. Choose “Current Item” for the source.
  8. Choose “PROFIT” for the field. (This is the calculated column.)
  9. Click Finish.

Now whenever someone creates or modified a list item in that list the non-calculated field will automatically be updated with the data from the calculated field.

This means that by adding the TOTAL PROFIT field to any view you can total it and get a sum or any other calculation since you are no longer using a calculated field (directly).

Hope this helps someone,
Richard