Summarizing data in portals
You can summarize data that's in a related field displayed in a portal. For example, you can get the total of all related records, the smallest or largest related record, or find the standard deviation of all related records in your portal. The portal can contain records from a related table or from the same table, using a relationship defined from and to the current table (a self-join).
To summarize data in portals:
Create a summary field in the table that related records are being displayed from. (This is the table displayed in the Portal Setup dialog box.) See Defining summary fields.
Tip  For a more complex summary of your data, use a calculation field to define a formula. See Defining calculation fields.
You can place the summary field anywhere on your layout, including inside the portal.
See Placing and removing fields on a layout.
Related topics 
Creating portals to display related records