Skip Ribbon Commands
Skip to main content
Post
Edited: 5/2/2012 11:01 PM
Sum a Calculated Column

Starting from a post on Sharepoint 2010 Forum, here are steps "How to"​

First, i created a new page, in which in first side i inserted the values from a list as they are. One of these columns is a calculated column, and is named: Difference

In the bottom side, already exist the DataFormWebpart modified. The page can be found here.

After I created the page with an initial DFWP I have selected from ribbon "Sort & Group".

sum_calculated_column_step01.png

 

 In the new window select one single line column, a mandatory column; in my case "Title"
sum_calculated_column_step02.png
 Next I need to group all items, in one group. For this, I will select all items with Title field not empty. To do it, select in the right side button "Edit Sort Expression...". In the new window i will insert a new code, as bellow:
sum_calculated_column_step03.png
 
Next step , check "Show group footer":
sum_calculated_column_step04.png
 
and select "Show column totals per group"
sum_calculated_column_step05.png
 Click OK button, and now we have in our page sum calculated values for each column. What i have to do is to customize itNow, let's customize the page. First, I will eliminate row named: "Count" as bellow:
sum_calculated_column_step06.png
 For this, select word "Count" and then goto code side and remove the code:
sum_calculated_column_step07.png
 As you can see , the row isn't there anymore.
sum_calculated_column_step08.png
Last step, customize the row which contain sum values:
sum_calculated_column_step09.png