Alteryx Designer Desktop Discussions

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

Match Amount and extract random data

vishwa1979
7 - Meteor

Dear Team,

 

I have raw data of policy no and amount.

I want random policy no which should match the total amount which should be around 4535080. 

+10 or -10. Not necessary to be exact match.

 

 

Thanks in advance

2 REPLIES 2
OTrieger
13 - Pulsar

@vishwa1979 
I think that you should be able to do that with Tile tool

ntakeda
12 - Quasar

I have implemented the following approach:

  1. Use a random function to shuffle the data.

  2. Sum the values from the top until the total reaches the target value (4,535,080 ± 10).

  3. If the total does not fall within the target range, repeat steps 1 and 2 (using a macro).

Due to the logic, the selection is not completely random—smaller values tend to appear more frequently.
However, the calculation is approximately random.

 

2025-03-25_10h01_17.png

 

Labels
Top Solution Authors