Views count grandchildren with specific value I have a Organic Groups structure of:

Organsiation

-Property

--Claim

I can use views to show all of the properties within an organisation by setting a contextual filters with OG membership: Group ID.

What I want to be able to do is count the number of open claims (a claim where a feild 'status' is set to 'open') within a property. For example:



Is this possible using views? It seems to ask a lot of views as I guess I need a subquery or second query to get the claims of each property.

Each claim references a property in its group audience feild. Each property references an organisation in its group audience feild.
EDITED

The end result of this will be a view using the organisation NID showing property with the number of claims.

ie. on an organisation's node, this would be the block.

Property 1 -  18 (open claims)

Property 2 -  13 (open claims)


Step 1: Grandchildren.


Add your regular group ID contextual filter.
Add the relationship, OG membership: Group Node from OG membership.
Add it to your contextual filter as its relationship. This gives grandchildren.
Filter out Property content type.
Add property entity reference as a field.


You now have a all properties with all claims.

Step 2: Counting


Try Views Aggregation in Advanced. It will probably cause an OG error.
Instead, install Views Merge Rows. https://www.drupal.org/project/views_merge_rows
It will add a new option under Advanced in your view. 
For title, Count merged unique values.
For property entity ref field, Use values as a filter.


Now you should have something similar to my example above. 

Step 3: Filtering to OPEN


Add a relationship for that field. I just tried it with a taxonomy field but a Boolean should be similar.
Add a filter, eg. (term from field_hello) Taxonomy term: Term ID (= 90210)


Adapt the filter to what you need or use the general idea to create your own solution.