I am working with a simple attribute table that has 4 columns; 'Xcoord' 'Ycoord' 'id' 'id2'
'id2' is a new field that i added to the attribute table. 'id' is a field showing land use classes with values ranging from 0-210.
I wish to make 'id2' be filled up with new values ranging from 1-6, based on their value in the 'id' field.
For example, I wish to write an expression for;
when 'id' are values 10,20,30 and 40, i want them to have a value of 1 in 'id2' and 'id' values of 50,60,70 as 'id2' value of 2 and so on and so forth till an 'id2' value of 6.
Basically like a hierarchical aggregation of land cover classes.
I am trying to self-learn the QGIS expression builder but I am encountering many difficulties trying to code the expression properly.
Here is an image of the