Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamic Field Formulas

owill
6 - Meteoroid

I am trying to dynamically add a large number of fields (>150) that references the field previous (as well as two static fields) for the calculation. For example, in the following table, each consecutive field is calculated based on the previous until the min is reached, at which point it goes back to max.

 

 RateMaxMinM 1M 2M 3
#10.11029.99.89.7
#20.5433.53.04.0
#3162543

 

Is there a way to do this dynamically where each field references the field previous rather than typing in each formula? Additionally, can it be done where the appended range is dynamic (i.e. can do M1-M10 or M1-M100)?

 

Thanks!

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

@owill,

 

Yes!  No macro required!

 

You will transpose the data and keep the "static" data as keys.  Then you'll use a formula that groups by ID (I checked the wrong box in my configuration in the picture, but fixed it in the post).  I created a formula near yours and called it new_value.  Then I used the crosstab tool to horizontally view the data.

 

Capture3.PNG

 

There is a version 10.x and a version 11 sample for you to work from.

 

Cheers,

Mark 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
owill
6 - Meteoroid

This works perfect, thank you Mark!

Labels