Alteryx Designer Desktop Discussions

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

Compare last 6 months columns data

JJ523
6 - Meteoroid

Hi, I have 12 months of data spread across columns and need to compare data in last 6 months and update the Comment column based on two conditions. 1) Update comment as Adjusted if value goes down in any of the last 6 months. 2) Update comment as Not adjusted if value is remains same or increases in last 6 months. 

Note :12 months input is dynamic represents last 12 months from current month

 

Appreciate for your help on this.

 

Account202101202102202103202104202105202106202107202108202109202110202111202112Comment
A1033010330103301033010330103301033034708347834794209420Adjusted
B148514851485148514851485148514851485176823602360Not Adjusted

 

 

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @JJ523 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1643286134133.png

 

Hope this helps : )

 

RolandSchubert
16 - Nebula
16 - Nebula

Hi @JJ523 ,

 

what about creating a formula from the field names and handing over this formula to a macro?

 

2022-01-27_13-16-23.jpg

 

I  get the field names using a Field Info tool, select the numeric fields only, keep the last 6, use a Summarize tool to build a formula and a macro for execution.

 

What do you think, could it be an approach?

 

Best,

 

Roland

JJ523
6 - Meteoroid

hi @atcodedog05 @RolandSchubert, both of your solutions worked.  I preferred to go without macro to make it simple. Thanks a ton :)

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @JJ523 

Cheers and have a nice day!

Labels