About displaying totals and calculated columns

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Views of lists and libraries can display information calculated from the other information in the view. The view can automatically calculate the total for a column, and you can add calculated columns that use custom formulas.

About displaying totals

When you create or edit a view, you can specify that a column display the total for that column. The total displayed can be:

  • The number of items in column

  • The numerical average of the numbers in the column

  • The maximum value in the column

  • The minimum value in the column

Thefollowing example shows a totals row that displays the number of entries in the Product column.

 

Product

Product Code

Color

 

Chair

1005

blue

 

Table

1007

purple

 

Lamp

1010

green

Total

3

   

About calculated columns

Calculated columns display the results of mathematical or logicaloperations. The operations can include information from one or more othercolumns in a list as well as system functions such as [today] to indicate thecurrent date. For example, if you want to add the value of column A with thevalue of column B, you can set up a calculated column to display the result. Inthe following example, the "Sum" column is the calculated column.

Column 1

Column 2

Sum

1

2

3

10

20

30

16

16

32

The formula you would enter to create this calculated column is:

[column 1] + [column 2]

A calculatedcolumn enables you to perform operations on data in any other column. And the columnsneed not be side-by-side or even next to the calculated column.

You can also use other operations for creating calculated columns. Forexample, you can combine text found in two columns. For example, you can create a column that combines the text found in the columns First Name and LastName, as in the following example.

Family Name

First Name

Full Name

Harrington

Mark

Harrington, Mark

Pak

Jae

Pak, Jae

Reinhart

Marie

Reinhart, Marie

You can combine the text in the first two columns by entering the following formula for the calculated column:

[Family Name] & ", " & [First Name]

The logical & (AND) operators in this formula combine the text inthe first column with a comma and space, and then the text from the secondcolumn.

You can also create calculated columns that work with calendar dates.In the following example, the calculated column automatically fills inthe date when a business process will be completed. The formula assumes thatthe process takes seven days to complete.

Date Submitted

Work Complete

12/05

12/12

12/06

12/13

12/07

12/14

The formula for this calculated column is:

[Date Submitted] + 7

Note: When entering a specific date into a calculation, make sure you use the date function. For example, to enter the date November 2, 2004, you would enter: =DATE(2004,11,02)

RelatedTopics