Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Percentages on Random dates

MsMilli
6 - Meteoroid

I am using (DateTimeADD('2016-01-01',RandInt(3),'years')) to add dates to rows with null or 0 in the date column. However, the distributions of the dates are even but I want to distribution the dates according to fixed percentages for each year (52% -2019, 27% - 2048, %15 - 2017, 4% - 2016). Can someone help with a tool, marco or workflow that can help in creating this? 

 

 

2 REPLIES 2
fmvizcaino
17 - Castor
17 - Castor

Hi @MsMilli ,

 

Take a look at the example attached. Your sum of percentages are 98% only, so I added 2% to 2016.

 

Let me know if this works for you.

Best,

Fernando Vizcaino

MsMilli
6 - Meteoroid

Thank you so much. You just saved me hours at work.

 

Milli

Labels