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.
SOLVED

How to dynamically read month column

Pandey19
8 - Asteroid

Hi,

 

I've attached a sample file where my file name always start with month like 08_2021 for Aug month, 09_2021 for Sep month

And i've few columns like AUG,JUL,MAY Activity. These column changes every month.

Ex- If file is 08_2021 (i.e Aug) then i'll have AUG,JUL and MAY values. (Current month, previous month and previous -2 month)

Likewise  if file is for 09_2021(Sep) then i'll have SEP,AUG and JUN values.

This is a pattern which is fixed.

 

Now i want to read this file in such a way that these values should dynamically adjust as per file name. I dont have to change or select them every month.

So if i've 08_2021 file then i should do SUM for AUG,JUL,MAY Activity.

If i've 09_2021 file then  i should do SUM for SEP,AUG,JUN Activity.

That means i should use Summarize in such a way that it should not look for column header but it should find if we have relevant column as per our file name.

And the output file should also automatically changes every month.

 

 

Is it possible to do in alteryx?

3 REPLIES 3
danilang
19 - Altair
19 - Altair

Hi @Pandey19 

 

One way to do this is to use a Dynamic Rename to standardize your variable columns i.e. [x],[x-1] and [x-3], perform your calculations on the renamed columns and then restore the old names.

 

danilang_0-1633786305304.png

 

Dan  

Pandey19
8 - Asteroid

@danilang 

Can you share this worklfow in 2020.2 version?

atcodedog05
22 - Nova
22 - Nova

Hi @Pandey19 

 

Can you try these files.

 

Hope this helps : )

Labels
Top Solution Authors