Creating Calculated Fields and Totals Rows
Learn Basics about Access 2013
Calculated fields and totals rows let you perform figurings with the information in your tables. Figured fields perform estimations utilizing information inside one record, while sums columns play out a computation on a whole field of information.
When you make a calculated field, you are including another field in which each line contains a figuring including other numerical fields in that line. To do this, you should enter a mathematical articulation, which is made up of field names in your table and mathematical images.
You don’t have to know excessively about math or articulation working to make a helpful computed field. Truth be told, you can compose vigorous articulations utilizing just grade-school math. For example, you could:
Use + to find the sum of the substance of two fields or to include a steady esteem (such as + 2 or + 5) to a field
Use * to multiply the substance of two fields or to duplicate fields by a steady esteem
Use – to subtract one field from other or to subtract a steady an incentive from a field
In our illustration, we will utilize a table containing the requests from one month. The table contains things recorded by sales unit—single, about six, dozen.
One section tells us the number sold of every deal unit. Another tells us the actual numerical value of every one of these units. For example, in the best line, you can see that two dozen fudge brownies have been sold and that one dozen equals 12 brownies.
To discover the total number of brownies that have been sold, we’ll need to increase the number of units sold by the numerical estimation of that unit—here, 2*12, which meets 24. This was a straightforward issue, however playing out that computation for each line of the table would be dull and tedious. Rather, we can make an ascertained field that demonstrates the result of these two fields duplicated together on each line.
To create a calculated field:
- Select the Fields tab, locate the Add & Delete group, and click the More Fields drop-down command.
- Hover your mouse over Calculated Field and select the desired data type. We want our calculation to be a number, so we’ll select Number.
- Build your expression. To select fields to include in your expression, double-click the field in the Expression Categories box. Remember to include mathematical operators like the + or – signs. Because we want to multiply our two fields, we’ll put the multiplication symbol (*) between them.
- Click OK. The calculated field will be added to your table. If you want, you can now sort or filter it.
For more examples of mathematical expressions that can be used to create calculated fields, review the Arithmetic Expressions in the Expression Builder dialog box.