Solved

How to group multiple attributes values under one attribute


I have a dataset containing 10ish attributes. Most of the fields are empty (if an item has a value in attr1, it has no value in attr2, attr3, attrN, etc), and I want to have a single attribute containing the value of all the others.

icon

Best answer by geomancer 29 June 2022, 18:05

View original

3 replies

tableHere is an example of the original table.

Badge +9

You can just use the AttributeCreator with an IF statement in the "Attribute value". Screenshot on how to choose if statement in AttributeCreatorIn this IF statement you can test if for example nom_1 has a value, if true you use the value of nom_1, else you continue testing the other attributes. Note that this method only works if 1 of the 10 attributes is filled per feature as described in your question.

 

Example If statement 

 

Userlevel 4
Badge +36

Or you can simply concatenate the attribute values in your new attribute.

@Value(attr_0)@Value(attr_1)@Value(attr_2)@Value(attr_3)

Concatenate 

Reply