Hi there,
I am fairly new to alteryx. I don't even know how to ask a question 😞 sorry!
Please see my input and the desired output below.
In the input there will be empty values for the ID field (string)?
I have to assign new IDs to these products in the format 'Product.xxx'. But the xxx' part has to increased by 1 each time.
Is there a way alteryx can auto-fill the ID field (string)?
Example input:
ID | Product |
Product.001 | Apple |
Product.002 | Orange |
Product.003 | Mango |
Kiwi | |
Banana |
Output I am after should look like this:
ID | Product |
Product.001 | Apple |
Product.002 | Orange |
Product.003 | Mango |
Product.004 | Kiwi |
Product.005 | Banana |
Thanks heaps,
Solved! Go to Solution.
One way is to add a record ID using the recordID tool. Keep in mind that you'll want to use a string here, and specifiy how many digits you want to include (in your example, 3).
Then follow with a formula tool, modifying your existing ID column with the formula
"Product." + [RecordID]
and then you can drop the original recordID field with a select tool. This is a simple way to go about it.
Thanks for the reply.
But I am not allowed to modify the existing ID column as we are using this as unique ID field and used in lots of other calculations and comparisons between weekly reports.
No problem, you could easily create a new field with the same formula, leaving the existing ID column alone. The logic remains.
Thanks,
I sorted the ID field in descending order and then added a record id tool followed by a formula tool to enter the ID where ever the ID field is Null. It worked, thanks.
User | Count |
---|---|
107 | |
82 | |
70 | |
54 | |
40 |