Alteryx Designer Desktop Discussions

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

unselect certain columns based on current month

Stuart_C
7 - Meteor

Hi,

 

I'd like to unselect or remove certain columns from my data set based on today's month.  The certain columns to unselect or remove would be today's month till the end of the year.

 

Current data set:

 

SalespersonStateJanuary FebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember
Amy LangCA1011152070156331055
Reese DawnTX999999910887788662

 

Requested output based on today's(7/17/20) month(July) would show all columns prior to July including the Salesperson and State column.

 

SalespersonStateJanuary FebruaryMarchAprilMayJune
Amy LangCA10111520701
Reese DawnTX9999999

 

Thank you,

 

- Stuart

3 REPLIES 3
JosephSerpis
17 - Castor
17 - Castor

Hi @Stuart_C I mocked up a workflow that produces your output. Let me know what you think?

 

Dynamic_Select_17072020.JPG

Stuart_C
7 - Meteor

This is perfect.  It does exactly what I needed.  I really appreciate your help @JosephSerpis !

 

I don't need to worry about the Conv Errors when it's trying to DATETIMEPARSE the salesperson and state column right?

JosephSerpis
17 - Castor
17 - Castor

Hi @Stuart_C the last part of the syntax of the formula "DateTimeMonth(DateTimeParse([Name],"%B"))=null()" is checking for fields that aren't Months e.g. Salesperson and State that fail to be converted to a numeric number to represent the month and passes it through the tool so those columns remain with your data. So yes you are correct. 

Labels