Suppose we have 3 records, with values 1, 2 and 5 (say). I'd like to expand this, adding a new field, so that every combination of the original values is made, like this:
1 1
1 2
1 5
2 1
2 2
2 5
5 1
5 2
5 5
Is there a way to do this? Note that the original list length may vary. Thx -
Solved! Go to Solution.
Hey @AKB, for this you just need to use an Append Fields tool and append the data to itself. Be mindful that this will of course blow up your data, especially if you do start with a large number of records.
Hi DataNath,
That works well, thank you. My data actually consists of many such lists, each different, and each list shall only be appended to itself, that is, in a GroupBy fashion. If we appended everything without grouping, things would blow up as you mention.
The Append Fields Tool has no GroupBy functionality. Can you see a way to do such an append?
Thx again -
@AKB do you have a key that links these sets of records? If so, you could just do a self-join instead of an append. Just do the join on the linking field(s).
Thank you again, that works well, using the key as you suggest.