Record ID Query
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have data that looks like this (the actual version has about 2400 rows);
Name | Course |
James | a |
James | f |
Bill | m |
Bill | f |
Bill | r |
Steve | k |
I'd like to give a record ID to each course starting at 1 for each person. So in the end I want the data to look like this;
ID | Name | Course |
1 | James | a |
2 | James | f |
1 | Bill | m |
2 | Bill | f |
3 | Bill | r |
1 | Steve | k |
Does anyone know how this can be achieved?
Thank you in advance for your help.
Best,
DHB.
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi DHB,
You can use a Multi_row formula tool.
in the config
Create a new field, ID (Int 32)
and the formula would be
IF [Name] = [Row-1:Name] Then [Row-1:ID]+1 Else 1 ENDIF
It looks and sees if the Name is the same as the previous row, if so it adds one, else starts again at 1.
P.S. oh yeah, Group By (see below)... must be five oclock somewhere...
Cheers,
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Group By: Name
[Row-1:ID] + 1
Cheers,
mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Bob
Not sure if I followed your instruction correctly as I got 1,1,2,2,2,3. Instead of 1,2,1,2,3,1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This one worked for me. Thank you so much for your help.
