Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Applying Simple % Formula to 50+ Fields

BSmithdubz
8 - Asteroid

Hi,

 

I am trying to apply these 3 formulas to the rest of the numeric fields in my data set. I originally thought to batch macro and cycle through these fields 3 at a time, but I'm wondering if there is another tool I am forgetting about that could be used? I also could list out all formulas one by one, but that seems inefficient as well. Thanks for the help! 

BSmithPdubz_0-1600375425335.png

 

6 REPLIES 6
jdunkerley79
ACE Emeritus
ACE Emeritus

You can use the Multi Field Formula tool to apply to all numeric fields in one go.

 

You would need 3 such tools but should allow you to do what you want

BSmithdubz
8 - Asteroid

I'm looking to get around 50 fields as outputs (each field has to generate a % of total field). I am not sure how to reference both fields used in the formulas in the multi-field tool. 

ImadZidan
12 - Quasar

Hello @BSmithdubz ,

 

check update workflow.

 

It may give you an idea.

 

let us know.

 

ImadZidan
12 - Quasar

@BSmithdubz ,

 

My input is in a container

jdunkerley79
ACE Emeritus
ACE Emeritus

Sorry had misunderstood the problem. I would do something like:

jdunkerley79_0-1600417441159.png

 

- As with your macro, work out the parts

- Next, transpose the data to be row-based

- Join total on and work out the %Total

- Cross tab the data back to be column based

- Use a dynamic rename to get column names back to what they should be

- Using a union tool and keeping 1 row of the original it is possible to restore original column order

 

Have attached a sample

BSmithdubz
8 - Asteroid

This works beautifully, thank you for the help! I'll have to perform a similar process for the income statement data which will be nearly the same besides a slightly different multi-field formula, so your help has saved me a ton of time. Thanks again!

Labels