The
Excel function DAVERAGE calculates the average of the numbers
in a column based on a given criteria, and in the same way
the DSUM function gives the sum of the numbers in a column
that meet a given criteria.
This demo in the Excel 2016 from Scratch series shows both
calculation and visualization. Peter Kalmstrom explains
how to calculate the average and sum of certain parameters,
and then he presents the data in a pivot table and a pivot
graph.