This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm trying to create a random number field and I noted that the RandInt(n) would be perfect, however, I would like to only like different numbers generated for different items and types. Is it possible to do this without summarizing the rows because I require them to be separated. Example below:
I believe you could do it where you sort the data on item name and type. Allocate a random number to each record and then use the multi-row formula to look back to the previous record and allocate the random number from above if the two fields are the same otherwise keep the existing one.
I however think it would be easier to take a separate stream, summarize to the two fields you want, allocate the random number and then join this back to your original dataset on those two fields.
Both methods should work, let me know if you need an example of either.
What you are looking for is basically a checksum instead of a random #. An MD5 is a random # that is tied to specific input values. Normally it returns the number as a hex string, but that is easy to convert to a number in Alteryx: