Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Unique Random numbers

Korpelak
8 - Asteroid

Hello everyone!

 

I am trying to create random numbers for a table I have so that I can plot the records in quadrants depending of its area (department) and Importance (H, M, L).

 

Basically the idea is to plot each record (audit) in its quadrant and in its level, being very high importance closer to the center. Almost like a radar type of chart but with bubbles instead of lines.

 

How can I create random numbers (coordinates for plotting) and unique (for creating a jitter effect) taking in consideration the ranges? 

 

I have attached a sample file. And please share if you can think of a better way to achieve the same goal, I am not married to this approach.

 

Cheers,

Karina

4 REPLIES 4
danrh
13 - Pulsar

I'm not positive on the specifics of your use case, but here's one way to generate random unique numbers:

image.png

 

I'm using RecordID to generate the unique numbers (depending on requirements for your range/increments you might need to tweak this), then I add a RAND() field to generate a sort order for those unique numbers, then Join on position.  This effectively adds a random unique integer to every record in the dataset.  Take a look, see if it fits the bill.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Korpelak

 

Here's a workflow that calculates random numbers for the input that are unique.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Korpelak
8 - Asteroid

Thank to both @danrh and @MarqueeCrew. I much appreciated the quick replies!

I used your solution and tweaked the rand formula to add the ranges: (rand()*(upper range-lower range))+lower range.

I repeated it so I would have random numbers for X and Y axis.

 

Karina

Heinrich_Preuß
8 - Asteroid

Oops. Wrong Thread. Can I delete it somehow?

Labels