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
The following example shows a totals row that displays the number of entries in the Product column.
About calculated columns
Calculated columns display the results of mathematical or logical operations. The operations can include information from one or more other columns in a list as well as system functions such as [today] to indicate the current date. For example, if you want to add the value of column A with the value of column B, you can set up a calculated column to display the result. In the following example, the "Sum" column is the calculated column.
The formula you would enter to create this calculated column is:
[column 1] + [column 2]
A calculated column enables you to perform operations on data in any other column. And the columns need not be side-by-side or even next to the calculated column.
You can also use other operations for creating calculated columns. For example, 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 Last Name, as in the following example.
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 in the first column with a comma and space, and then the text from the second column.
You can also create calculated columns that work with calendar dates. In the following example, the calculated column automatically fills in the date when a business process will be completed. The formula assumes that the process takes seven days to complete.
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)
Add a calculated column
About column references in a formula
About calculation operators
About constants in formulas
Examples of common formulas