Summarizing data in portalsYou can summarize data that's in a related field displayed in a 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).See Defining calculation fields for more information.
2. For the calculation field, define a formula that includes an aggregate function for the type of summary calculation you want to perform.For example, if you are in the Invoices table and want to define a calculation to total the related values in the Price field of the LineItems table, use the formula Sum(LineItems::Price)See Placing and removing fields on a layout for more information.