Add incremental column value based on criteria

I have a dataset like this:

||Id|SubId|Text||
||01|9200|Some text||
||01|9200|Some text||
||01|9200|Some text||

I want then to create a new column “Incremental”, starting at 100, and adding 100 for each similar Id & SubId, so that the above dataset after transform looks like:

||Id|SubId|Text|Incremental||
||01|9200|Some text|100||
||01|9200|Some text|200||
||01|9200|Some text|300||

Is there an easy way to do this?

Have a look to this discussion https://forum.easydatatransform.com/t/pdf-to-xfdf-to-edt-comments-annotations/1458/4

I think it is more or less the same solution you need, maybe you need to concat the ID and SubID columnd before using Total. Afterwards multiply the total result with 100 with calculate tranformation, or you add in the new created column used for Total 100 instead of 1.

HMmm, had a look, but I don’t see how that works - or to explain a bit better - the IDs here are all over the map, UUIDs.

Here is a snippet of the actual data I am working on:

The first two columns there are my ID and SUBID columns, that I want to match up, and have the INCREMENTAL column (KITOPNO) be 100 or multiples of that if SUBID is duplicated within the ID.

So these data are wrong, the wanted INCREMENTAL value added to the screen clippings here:

Was that better explained?

The trick is the Concat

in the transformation file I renamed the original KITOPNO to KITOPNO old and the new generated one to KITINO new (last column)

Column values egilDOTnet.transform (3.6 KB)

2 Likes

This is basically the same approach as @Olaf.

image

KITOPNO.transform (2.9 KB)

If we have misunderstood you might have to give some better example data.

1 Like

Ahh, genius! You DID understand, Olaf, I just didn’t! :rofl:

but I hope you did understand the second post with the example

Absolutely did! Worked like a charm.