I have a content type shortcut with the fields field_namespace and field_active. Additionally, I have a Taxonomy term vocabulary named namespace that is used in field_namespace.
Example content:
Title | Namespace | Active ------------+-------------+------- Shortcut 1 | Namespace A | True Shortcut 2 | Namespace A | False Shortcut 3 | Namespace B | False Now, I have a view displaying a list of these Taxonomy terms as a table. A column of this table display the number of Shortcuts tagged with the particular term. Example:
Namespace | Shortcut count ------------+--------------- Namespace A | 2 Namespace B | 1 I built this using a Views Relationship with Taxonomy term: Content with term. I used this relationship to add the Field Shortcut: Nid with the Aggregation Type COUNT DISTINCT.
What I now want: The Shortcut count shall only consider Shortcuts whose field_active is True, i.e. the output shall be:
Namespace | Shortcut count ------------+--------------- Namespace A | 1 Namespace B | 0 So the COUNT DISTICT aggregation shall be somehow filtered by the value in field_active.
Is there an UI way to do this? If not, which hook is appropriate to do it programmatically?