<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    On 3/14/2021 5:28 PM, Andrea Giudiceandrea wrote:
    <blockquote type="cite">
      <pre class="moz-quote-pre" wrap="">David Strip-4 wrote
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">aggregate( 'B','sum', "Confirmed", "Country_Region" 
ILIKE attribute($currentfeature, 'SOVEREIGNT')) 
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Hi David,
in the filter the source feature can be accessed with the variable @parent
<a class="moz-txt-link-freetext" href="https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/functions_list.html#aggregate">https://docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/functions_list.html#aggregate</a>

aggregate( 'B','sum', "Confirmed", "Country_Region" ILIKE attribute(@parent,
'SOVEREIGNT'))


</pre>
    </blockquote>
    that did it. Does that mean that <i>attribute(@parent, ...)</i> is
    the value of the attribute for the feature for which the attribute
    is being calculated?<br>
    And what does $currentfeature mean? Is it evaluated to the current
    feature of Layer B, not A?<br>
  </body>
</html>