Count, sum, average, min, max in Views
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
Views 2
Use Views Calc module: http://drupal.org/project/views_calc
Views 3
After enable aggregation those count, min, max, sum functions will be available, see below:
Take care to avoid using the 'Distinct' option in the 'Query settings' if using aggregation, it can interfere with your intended result. Removing sort orders for SUM can also solve problems, because a sort order means the results you want to sum are no longer identical.
Another way is that follow http://drupal.org/node/1370254 (the template file e.g. views-view-table.tpl.php), calculate whatever you want, then customize append the results to the html table.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion