I'm struggling to create an expression to sum the total area of a project for a certain attribute. The areas are continuous so I'd like to be able to create a label that had both the features acres and total acres
The data structure is currently: ProjectName
, Type
, Acreage
The Type
is one of two things:
- Useable
- Unusable
Acreage
is labelling expression to convert sq m into acres.
Is there a way that I could get the label to return the Sum of all Useable
and Unusable
depending on the project?
The desired label would look like:
Project – xxx
Type – Usable rent
Acres – xxx
Total Acres of Usable Rent for Project: xxx
Total Acres of Unusable Rent for Project: xxx
Best Answer
I don't believe what you want is possible when creating a label as the functions that allow you to access and summarize data from an entire layer do not appear to be available when labelling. It seems you are limited to
$feature
, but you can create the text as a pop-up.To answer your question I have to spoof up some sample data, this is shown below:
You then configure the pop-up and create an expression:
I then assigned this expression to the Title and turned off fields
The final output is: