Skip to main content
Solved

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

  • December 15, 2022
  • 4 replies
  • 119 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

Best answer by dustin

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

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.

4 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • December 15, 2022

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


  • Author
  • 5 replies
  • December 15, 2022

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


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • December 15, 2022

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'.


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • Best Answer
  • December 15, 2022

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