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

Version Downloads Date Links
6.x-1.0-alpha1 tar.gz (9.9 KB) | zip (11.54 KB) 2009-Nov-02 Notes

Development releases

Version Downloads Date Links
7.x-1.x-dev tar.gz (13.48 KB) | zip (15.42 KB) 2013-May-11 Notes
6.x-1.x-dev tar.gz (10.17 KB) | zip (11.57 KB) 2011-Jul-22 Notes

Project Information


Maintainers for Views Crosstab

  • eft - 8 commits
    last: 1 week ago, first: 1 week ago
  • citlacom - 1 commit
    last: 1 year ago, first: 1 year ago
  • Owen Barton - 1 commit
    last: 3 years ago, first: 3 years ago

Issues for Views Crosstab

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants