We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamically Select fields based on Condition

Yogish
6 - Meteoroid

Hi 

I'm fetching the files from the folder on monthly basis. only the latest dated file is fetching to Workflow. In that having fields names with dates i.e., 1, 2, 3,  .... till 31. The files which i get as an input is having all these dates irrespective of Months.

 

Now when i read Jan month file, all the fields from 1st to 31st should be selected. 

But if i read Feb file it should select only 1st to 28th fields. which means 29, 30 and 31st should unchecked. 

 

This should be done in dynamic way.

 

Appreciate a quick solution on this. 

2 REPLIES 2
mbarone
16 - Nebula
16 - Nebula

Is there something in the file (or maybe the file name or modified date) that will tell you what the "incoming" month is?  If you know the incoming month, you can pretty dynamically create a solution. 

 

Say you've determined that the incoming month from the file is January.  You can dynamically generate a column of dates for January (1-31).  Then you can transpose your file so each field is a row.  And then add a record ID to the field and just join the record ID to the dates, and then crosstab back to the original format.

 

See attached.  

Qiu
21 - Polaris
21 - Polaris

@Yogish 
Can you share a sample input?
I am not sure we should have 2 input data or just 1.

Labels
Top Solution Authors