I have a view showing all the OG groups. Now, I'd like to display a number of members and posts within the group next to each group name. I have spent last few days looking for a solution for my problem, unfortunately with no luck. This would look like this:
Group name - Members: X Posts: Y
I tried to create separate views showing list of groups (this was easy) and number of members of each group (easy) and then use views_field_view module to display the number of members as a field under the group name. This almost worked. The problem is that each group shows now a multiple times on the list. I will be rally grateful for any direction or advice. Cheers!
The easiest thing to try with your current setup is under "Advanced" > "Query settings" select distinct on the first view.
If this dosnt work, instead of using views_field_view just output the group ID in the first view and then theme this field in a views template file to bring in your other view setting the group id as the argument to this view.
Here is an example, put the following code in a file called:
views-view-field--view1name--groupidfieldname.tpl.php
changing the groupid, view and display names.
?>