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.
SOLVED

Generate rows based on reference table

tjamal1
8 - Asteroid

Hello, 

I have a table which contains first name like this 


1 Lisa 2 John 3 Jonathon 4 William 5 Mario 6 Bradley 7 Amanda 8 Cole 9 Christina 10 Shirley 11 Michael 12 Alexandra 13 Patrick 14 Kevin 15 Steven 16 Kayla 17 Kimberly 18 Joseph 19 Michael 20 Nicole

 I want create another table containing 1000 records based on these condition 

 

FirstName : Random value from above names 

TransactionDate : any random date between 1975 & 1990

Status : Pick random value from these three (Pending , Processed ,Completed)

 

Is there anyway to do it in Alteryx (an example would be helpful)

 

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @tjamal1 ,

 

Here is an approach to solve your requirement.

 

I used rows generate tools to generate 1000 rows.

Later used RandInt function to assign random values for 3 columns which included an random Name ID field.

Later i joined the generated rows data and First Name list on Name ID.

atcodedog05_0-1587285476914.png

 

Achieved output

atcodedog05_1-1587285717622.png

 

The workflow is attached in the reply.

 

I hope this helps your purpose. If there is still anything specific you are looking for please reply back.

If it solves your case study please like the reply and mark the reply as accept solution.

 

PS: really appreciate that you were able to provide the file or else it would have been harder to provide solution.

 

Thank you for sharing this scenario. It was a great exposure.

Cheers and Happy Analyzing : )

 

tjamal1
8 - Asteroid

Thanks for the detailed reply and solution , 

Is there any we could get date in full format instead of only year ?

 

like date between 01-01-1975 and 31-12-1990?

atcodedog05
22 - Nova
22 - Nova

Hi @tjamal1 ,

 

Here is an approach including assigning random dates.

Apparently generating random dates is not simple generating random number.

Hence have creates a list of dates and used a randomly generated Date ID to join them.

 

atcodedog05_0-1587301358386.png

The workflow is attached in the reply.

 

I hope this helps your purpose and meets the expectation. If there is still anything specific you are looking for please reply back.

If it solves your case study please like the reply and mark the reply as accept solution.

 

Thank you for sharing this scenario. It was a great exposure.

Cheers and Happy Analyzing : )

tjamal1
8 - Asteroid

Thanks for the help , really appreciates the help. 

 

Have a good Day ! 🙂

 

Stay Safe

atcodedog05
22 - Nova
22 - Nova

Great it worked out.

 

You are welcome. Always happy to help : )

 

You to stay safe and a great day 😀

 

Cheers and Happy Analyzing : )

Labels