I am trying to add an expression to a legend item in my print layout that auto-updates when values in the field change.
Essentially, I have a layer with a field which calculates the length of each feature and would like the print layout to display the sum of these lengths for all features.
Could someone point me in the right direction?
get_feature(layer, attribute, value)
and thenattribute(feature, attribute_name)