I am trying to create a view that displays how many times each child has been related to parents through multiple fields.
asuming we have two parents ("Simple Parent" & "Extended Parent"), and three children ("Red child", "Blue child", "Green child") ;
the parents have two types of fields ("field_children", "field_morechildren") that relates to multiple child entity references.
if the content is setted like this :
-
Simple Parent
- field_children : Red Child, Blue Child
-
Extended Parent
- field_children : Red Child
- field_morechildren : Red Child
i can sort easily with two relationships and two fields added to my view :
Child | field_children | field_morechildren |
---|---|---|
Green child | 0 | 0 |
Blue child | 1 | 0 |
Red child | 2 | 1 |
i want to display the sum of each fields result like that :
Child | Total |
---|---|
Green child | 0 |
Blue child | 1 |
Red child | 3 |
how to proceed?