Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Randomize list into a new column in dataset

monish_chandra
8 - Asteroid

I have a list of IDS i.e 4200 as show below

 

NPI

100398488

100398993

399000499

100389944

.

.

 

I have a dataset of 1200 records, I want to append the above NPI list and randomly assign values to the dataset as a new column. 

 

RecordID        Name        NPI

1                     A                100398488

2                     B                100398488

3                     C                399000499

 

I tried using a RANDINT(45) and created a new column and joined this, but it is too random and not picking enough values. I might be implementing it wrong here. Can you please let me know any alternative logic?

1 REPLY 1
estherb47
15 - Aurora
15 - Aurora

Hi @monish_chandra 

 

Perhaps fewer random numbers for your Rand to generate?

 

I'd go up to the number of NPI's you have (in the attached example, I have 4).

 

But, instead of Rand(4), I use Rand(3)+1. That will also get rid of the zero based values. Of course, you could always start numbering your NPIs with a zero,

 

Let me know if this helps

 

Cheers!

Estherimage.png

Labels