Skip to main content
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.

Best answer by geomancer

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 

View original
Did this help you find an answer to your question?

3 replies

  • Author
  • June 29, 2022

tableHere is an example of the original table.


birgit
Influencer
Forum|alt.badge.img+16
  • Influencer
  • June 29, 2022

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 

 


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • Best Answer
  • June 29, 2022

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 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings