To summarize values in a PivotTable in Excel Online, you can use summary functions like Sum, Count, and Average. The Sum function is used by default for numeric values in value fields, but here’s how to choose a different summary function:

Rightclick anywhere in the PivotTable, and click Show Field List.

In the PivotTable Fields list, under Values, click the arrow next to the value field.

Click Value Field Settings.

Pick the summary function you want, and click OK.
Note: Summary functions aren’t available in PivotTables that are based on Online Analytical Processing (OLAP) source data.
Summary functions
Use this summary f unction : 
To calculate : 
Sum 
The sum of the values. It’s used by default for value fields that have numeric values. 
Count 
The number of nonempty values. The Count summary function works the same as the COUNTA function. Count is used by default for value fields that have nonnumeric values or blanks. 
Average 
The average of the values. 
Max 
The largest value. 
Min 
The smallest value. 
Product 
The product of the values. 
Count Numbers 
The number of values that contain numbers (not the same as Count, which includes nonempty values). 
StDev 
An estimate of the standard deviation of a population, where the sample is a subset of the entire population. 
StDevp 
The standard deviation of a population, where the population is all of the data to be summarized. 
Var 
An estimate of the variance of a population, where the sample is a subset of the entire population. 
Varp 
The variance of a population, where the population is all of the data to be summarized. 