none
Totaling a Calculated Field

    Question

  • Hi Everyone,

    I have calculated field that I am trying to "SUM" in a view. When expanding the "Totals" option in the view setup my "Calculated Fields" are not available. Is there a way to sum a calculated field within a view?

    Thanks
    • Moved by Mike Walsh FIN Friday, July 24, 2009 6:44 AM spd answer (From:SharePoint - General Question and Answers and Discussion)
    Thursday, July 23, 2009 7:52 PM

Answers

  • > Is there a way to sum a calculated field within a view?

    Yes, but requires some work in SharePoint Designer, using some XSLT skills. Clayton has mentioned using a workflow, and that works. To do it using SharePoint Designer (SPD), basically you need to create a view, go to SPD and convert it to an XSLT Data View and then add the totals.  It looks like it's not summable in a view as SharePoint stores the result of the calculation as a string, not a number. You will need to convert the calculated field from a string into a number and then sum it.


    The article below is focused on grouping a view by more than two columns, but will give you a hint on how to do it.  One day I need to write up the steps for just summing a calculated column. 

    Go here: http://techtrainingnotes.blogspot.com/2008/11/sharepoint-group-by-on-more-than-2.html

    and look for: "Now to add the total…"


    Mike Smith TechTrainingNotes.blogspot.com
    Friday, July 24, 2009 4:14 AM

All replies