Skip to main content
Solved

How to group multiple attributes values under one attribute

  • June 29, 2022
  • 3 replies
  • 358 views

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 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

  • Author
  • 5 replies
  • June 29, 2022

tableHere is an example of the original table.


birgit
Influencer
Forum|alt.badge.img+21
  • Influencer
  • 131 replies
  • 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+58
  • Evangelist
  • 932 replies
  • 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