Use the PERCENTOF function to return the percentage that a subset makes up of a given data set. It commonly used in GROUPBY and PIVOTBY functions.
Note: PERCENTOF is logically equivalent to =SUM(data_subset)/SUM(data_all)
Syntax
The PERCENTOF function sums the values in the subset and divides it by all the values.
=PERCENTOF(data_subset,data_all)
Argument |
Description |
---|---|
data_subset Required |
The values that in the data subset |
data_all Required |
The values that make up the entire set. |
Example
Example 1 uses PERCENTOF to calculate the percentage that Bib-Shorts and Bike Racks comprise of the entire set.