Solved

How to group attributes and generate group id based on 2 fields

  • 15 December 2022
  • 4 replies
  • 12 views

Group ID should start from 1 for each unique Attribute 1 value and the smallest value of Attribute 2 for each Attribute 1 value should get it as follows:

image

icon

Best answer by dustin 15 December 2022, 15:29

View original

4 replies

Userlevel 3
Badge +26

Probably a few ways to get this result, but this should work.

  • Aggregate based on Attribute1 and Attribute2
  • Sort based on Attribute1 and Attribute2
  • Counter gives the aggregated features the GROUP_ID
  • Deaggregate, which retains the GROUP_ID on the individual features.

image

Did you really get Counter to start from 1 for each attribute1 value?

Userlevel 3
Badge +26

Did you really get Counter to start from 1 for each attribute1 value?

I really did😀 In the Counter, you can specify the Count Start with '1'.

Userlevel 3
Badge +26

Did you really get Counter to start from 1 for each attribute1 value?

Ahh, one small correction. I have attached the workspace. The group by needs to be set in the Counter:

image

Reply