Is there an object or method for creating a column of sequential numbers?
I've tried enumerate and rank object, however these objects depends on the other columns being sort. What i'm after is independently assigning number 1 to X down the column.
Posted 27 February 2018 - 12:53 PM
The Enumerate object is the method of choice for generating an index column. If you want a random assignment you can generate a column with a random number using Data Wizard and a Custom Transformation like rand(0,1,ID). Then you can use this random column for enumeration.
Posted 27 February 2018 - 03:11 PM
The Enumerate object is the method of choice for generating an index column. If you want a random assignment you can generate a column with a random number using Data Wizard and a Custom Transformation like rand(0,1,ID). Then you can use this random column for enumeration.
Thank you for your reply. Unfortunately the rand function generated the same random number within every cell of the same column.
Posted 27 February 2018 - 03:54 PM
CTUK - can you perhaps post a CSV or PHXPROJ illustrating exactly what it is you want to do?
Is it you want one sequence to continue over all profiles or what? Enumerate can use user values and data transformations are normally quite flexible.
thanks. SImon.
Posted 28 February 2018 - 02:33 PM
I think the attached example using enumerate covers a couple of options that you want to do, resetting the sequence within profile or not.
Please take a look at this and let us know if there is something missing.
Simon.
Hi Simon
Thank you very much for providing the example. It is very useful. I can see from the first workflow that it's just a matter of creating a unique combination of each row in order to enumerate a unique number each time.
For the attached file, I've also added an extra column to the data "Occasion" with the same subject and timepoints. The enumerate method works if the Occasion column is included for sorting as well.
Edited by CTUK, 28 February 2018 - 02:33 PM.
0 members, 0 guests, 0 anonymous users