How to create row ID in Tableau Prep

In Alteryx, when we don't have row ID we can just put a Record Id tool in that creates them. How do we do that in Tableau Prep?
There's not a straightforward function in Tableau Prep. But with these 2 steps can create row IDs.:

Step 1.

Create a dummy field assigning '1' to each row to ORDERBY so it's not reordering the data.

Step 2.

Create the RowID field by using the ROW_NUMBER() formula and ORDERBY the dummy field. This will assign a number to each row without changing the order of the rows.

Author:
Linda Duong
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab