Fetch Record From Second Table in Aggregate Function

Fetch Record From Second Table in Aggregate Function

Hi,

I need an Aggregate Function that counts the number of records in the Calls table that:

1 - Are associated to a Deal; AND
2 - The Deal associated to that Call is in a stage called "6 - Proposal Presented to Client".

I am using the following function, which already counts the Calls associated to Deals.

count_if(("Calls"."POTENTIALID" <> 0))

Now I need to apply the 2 above criteria (1 and 2).

Any ideas?

Thank you in advance.

TDM