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

How do I dynamically select a field based on another field's data?

akihirokomatsu
8 - Asteroid

I have a dataset that looks like below. How would I use either "DateTimeNow" or "DateTime_Out" to dynamically select ONLY the "Jun-18", but would choose Aug-18 when the DateTimeNow/DateTime_Out is in August? Any ideas are welcome! Thanks.

Capture.PNG

4 REPLIES 4
jasperlch
12 - Quasar

Hi, would you consider using Cross Tab and Transpose like below:

 

Capture1.PNG

neilgallen
12 - Quasar

@akihirokomatsu The "Dynamic Select" tool would suit your purposes. In this instance, set the configuration to be "Select via a Formula."

 

dynamic select.PNG.

 

Note that this is setup to choose the current month field and not to your "DateTime_Out" function but if you wanted the previous month adding a datetimeadd function to the beginning would not be difficult.

 

Also in this case you wouldn't necessarily need the datetimenow or dateimteout fields as alteryx is aware of the current time and can use that in a function.

 

 

akihirokomatsu
8 - Asteroid

Thank you! This worked very well.

akihirokomatsu
8 - Asteroid

Thank you! This is exactly what I needed.

Labels