Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Dynamic Select?

IJH34
8 - Asteroid

I am looking a solutiont that will select the PRDNO, LOCATION, KEY, and the current month's data (i.e. May) whenever I run my workflow. 

 

BEFORE:

PRDNOLOCATIONKEY19-Apr19-May19-Jun19-Jul
640037000003SST

326

326326326
640037000 003NET252472503502
640037000 003DEM207257285243
640037000 003SOH49000

 

AFTER: 

PRDNOLOCATIONKEY19-May
640037000003SST326
640037000 003NET472
640037000 003DEM257
640037000 003SOH0

 

I believe dynamic select will accomplish this but I'm not sure how to say give me the fields that contains the current month abrv. 

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @IJH34 

 

I think this works well:

 

dynamicslec.PNG

 

 

Use Dynamic Select Formula:

IF [FieldNumber] <=3 OR ToDate(DateTimeParse([Name],"%y-%b")) = ToDate(DateTimeTrim(DateTimeToday(), "month")) THEN "True"
ELSE "False" ENDIF

 

 

Cheers,

kelsey_kincaid
12 - Quasar
12 - Quasar

If you use formulas to calculate the current month, then transpose you can filter based off of your calculated date. Then you can cross-tab the data to reformat it back to the way you want to see it. Example attached.

 

@Thableaus Your solution definitely works better! I'll have to take a closer look at the dynamic select tool next time!

IJH34
8 - Asteroid

@Thableaus this is beautiful!

Labels