<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi,<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">I'd like to add an example of an aggregate expression to my recent PyQGIS 101 tutorial on expressions [0]. I got expressions for individual features working but cannot figure out how to set the context for aggregate expressions correctly. </div><div class="gmail_default"><br></div><div class="gmail_default">As far as I can tell, the PyQGIS Cookbook doesn't contain any information on this either [1].</div><div class="gmail_default"><br></div><div class="gmail_default">I'd appreciate any examples! </div><div class="gmail_default"><br></div><div class="gmail_default">Regards,</div><div class="gmail_default">Anita</div><div class="gmail_default"><br></div><div class="gmail_default">[0] <a href="https://anitagraser.com/pyqgis-101-introduction-to-qgis-python-programming-for-non-programmers/pyqgis-101-using-expressions-to-compute-new-field-values/">https://anitagraser.com/pyqgis-101-introduction-to-qgis-python-programming-for-non-programmers/pyqgis-101-using-expressions-to-compute-new-field-values/</a></div><div class="gmail_default">[1] <a href="https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/expressions.html#evaluating-expressions">https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/expressions.html#evaluating-expressions</a></div></div></div></div></div>