Posted by Owen Barton on November 2, 2009 at 7:58am
This views style plugin lets you display views results as a crosstab (also commonly called a pivot table) - grouping rows by one field, columns by another, and using an aggregate function (count, sum etc) of a third field for the table data.
For example, this module will take a table view with linear output like:
| User | Content Type | Node ID |
|---|---|---|
| Anita | Blog | 1 |
| Anita | Page | 3 |
| Barak | Page | 5 |
| Jamila | Blog | 2 |
| Jamila | Blog | 4 |
| Jamila | Page | 6 |
And turn it into a crosstab that counts the number of each type of content for each author:
| User | Blog | Page | Total |
|---|---|---|---|
| Anita | 1 | 1 | 2 |
| Barak | 1 | 1 | |
| Jamila | 2 | 1 | 3 |
A default view "content type count by user" that does just this is included with this module.
Usage notes:
- This is a new module, and has not yet been tested in a production setting - please treat as such!
- It is possible to produce SQL errors with this module, especially with very complex views. A good understanding of SQL will help you understand and fix these.
- This module is fairly likely to be incompatible when used in the same view as other views modules that extensively modify the views query, such as Views Group By.
Related modules:
- Views Group By - allows grouping an aggregation of fields (useful for lots of things!), but does not allow a crosstab of 2 fields against each other.
- Views Calc - allows multiple column oriented aggregates to be added, as well as providing additional formatting control.
Downloads
Recommended releases
Development releases
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Statistics, Views
- Reported installs: 103 sites currently report using this module. View usage statistics.
- Downloads: 1,695
- Last modified: May 10, 2013