Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

How to programatically delete date fields?

$
0
0

Hello everyone!

 

I've just received Alteryx and am jumping in and trying to blend together 7 reports that we get every week into one Tableau Extract. 

 

One of the reports is set up in a ridiculous fashion, with every week in the year set up as a column (/field I guess). The data in these columns then become non-zero as the year progresses. 

 

(See here for screenshot of two weeks with data and one week without)

 

This Alteryx workflow will be used every week - so I need to:

 

1) Strip the text from the column headers to just leave the dates

2) Automatically delete every column except the three headed by the date closest in the past to (today's date) - as if the Alteryx flow is run at the end of the week I don't want it finding the closest week in the future.

3) Rename the remaining column to "Sales volume" or whatever as appropriate.

 

(3) seems pretty easy, but I'm stumped on (1) and (2). 

 

Any advice welcome..thank you!

 

Sam


Viewing all articles
Browse latest Browse all 4999

Trending Articles