I want to do some calculations based on a column which has the same name as the layout name (Graugans in this example).
To have less typing work, I thought about using the layout name as variable. But it doesn't work, the expression dialog shows:
No feature was found on this layer to evaluate the expression.
But when I type the name Graugans
instead of @layout_name
, it works...What am I doing wrong?
Here is the code:
This doesn't work:
aggregate( 'bgrbauswertung22_4f14ac5b_b4c2_4f88_a29b_16379028da2e', 'sum', "@layout_name")
This works:
aggregate( 'bgrbauswertung22_4f14ac5b_b4c2_4f88_a29b_16379028da2e', 'sum', "Graugans")
@layout_name
gives back Graugans