Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Dynamically delete columns based on todays date

PrashantJP
7 - Meteor

Hi All,

 

I am looking for a solution which can dynamically keep the required columns and remove other columns. Example, if I run the workflow in october, it should show me columns for october, November and December and the rest of the columns (Jan,Feb, Mar, Apr, May, June, July, Aug and sep should not appear in the output. Could you please help me with the same or point to a tool that can be used for achieving this

 

ProcessDateMTD Uploads90 Day Prior AgeingAgeingJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberFuture NRD
AM EMEA2022-10-18045201,79711,4106,5292,3775,98212,59911,2268,1172,9815,1625,82815,84122
AM Asia2022-10-180529013323720001943345745295225190
AM NA2022-10-1806603313,0082,0655431,9663,8983,2243234031,0381,2274,050333
4 REPLIES 4
DataNath
17 - Castor

Hey @PrashantJP, how do you get on with something like this? We leverage the Dynamic Select tool and check that each field is either a) not a month or, b) parses the month and checks that it's equal to or larger than the current:

 

DataNath_0-1666083981897.png

RobertZiegl
8 - Asteroid

Hi,

I would recommend to use the transpose tool to turn the colmns to rows, filter with a simple Filter tool and turn the rows back to columns wiht the cross tab tool.

RobertZiegl_1-1666084174652.png

for the filter i would recommend turning the Months to int or a date & compare it with DATETIMETODAY().

 

grazitti_sapna
17 - Castor

@PrashantJP , Please use the below workflow to get your desired result. You can extract the month from date time now and then filter your data on the basis of it. Please let me know if it was helpful.

Sapna Gupta
PrashantJP
7 - Meteor

Many thanks @grazitti_sapna ! It worked!

Labels