I have a QGIS project with N layers, each pointing to the same CSV file with columns "1_1, 2_1, ..., N_1".
I would like each layer to refer to its respective column (Layer 1 -> column 1_1, and so on) and display points based on the Graduated style I have set. I am able to get the result I am looking for by manually selecting the Column in each Layer Style for every layer like so:
However, this is very time consuming so I am trying to figure out a way to use Expressions to relate the layer name to the respective column name. I have tried the following expressions with no success:
- @layer_name+'_1' (Valid expression but every point has the same value and style)
- "@layer_name+'_1'" (Valid expression but null output)
- "concat(@layer_name,'_1')" (Valid expression but null output)
- column "@layer_name+'_1'" (Invalid expression)
- column name "@layer_name+'_1'" (Invalid expression)
I am using this as reference: https://docs.qgis.org/2.8/en/docs/user_manual/working_with_vector/expression.html
Is there something I am misunderstanding about expressions in QGIS?
This is my desired result: (One layer visible)
This is the closest I was able to get using the first expression: