Closed (fixed)
Project:
Views Group By
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2009 at 20:21 UTC
Updated:
1 Sep 2009 at 19:10 UTC
I have attempted to create a view that accepts an argument that is a taxonomy term and group on (and count the number of instances of) another taxonomy term that comes from the same content type. So far without success.
For example suppose I have a content type called Dogs. And in that type I have a content taxonomy field labled "breed" (field_breed) and I also have a content taxonomy field labeled "color of dog" (field_color).
I want to pass the the term "field_breed" into the view and display the colors users have entered and the number of times each color was entered. Output might look like:
brown 5
black 3
red 2
How can I set this up?
Comments
Comment #1
drupeshare commentedI figured it out. I just needed to have the content field and a node: NID field. Then group on the content field and aggregate on the NID field. I had added other fields that were causing the aggregation not to work even though they were not part of the sql aggregation.
Of course, I also added an argument Taxonomy:Term and set the validator to the correct vocabulary type.
Comment #2
rsvelko commentedyou've done this like in the docs (http://drupal.org/node/389230) , right?
marking as fixed
Comment #3
drupeshare commentedYes that is correct.