Alteryx Designer Desktop Discussions

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

Dragging formula across / Replicating formula similar to Excel

mudith
5 - Atom

I have multiple columns in alteryx: Price 2019, Price 2020, Volume 2019, Volume 2020, so and so forth until 2028. Multiplying Price 2019 by Volume 2019 will give me Revenue for 2019. Similarly, multiplying Price 2020 by Volume 2020 will give me Revenue 2020. Can you please suggest how to do this using Multi Field Formula, or any better alternative?

Price 2019Price 2020Price 2021Volume 2019Volume 2020Volume 2021Revenue 2019Revenue 2020Revenue 2021
102030101215100240450
 
5 REPLIES 5
OllieClarke
15 - Aurora
15 - Aurora

Hi, @mudith, the fully dynamic way to do this, would be to pivot all those columns, break apart the name, restructure and then calculate the revenue
image.png

Once you've done this you can take a similar approach to get the data back in the original format if you want:

image.png

Hope that helps,

 

Ollie

 

ChrisTX
16 - Nebula
16 - Nebula

Check out the Multi-Field Formula Tool

 

Designer > Tools > Preparation > Multi-Field Formula Tool

https://help.alteryx.com/current/en/designer/tools/preparation/multi-field-formula-tool.html

 

Community > Learn > Academy > Tool Mastery > Multi-Field Formula

https://community.alteryx.com/t5/Tool-Mastery/Tool-Mastery-Multi-Field-Formula/ta-p/39658

 

OllieClarke
15 - Aurora
15 - Aurora

@ChrisTX 
How would you use the multi-field formula tool to solve this problem?

ChrisTX
16 - Nebula
16 - Nebula

@OllieClarke you're right.  With the changing field names, I would need to use Dynamic Replace as the primary tool.

 

But the Transpose / Crosstab you suggested is definitely easier to follow and avoids the complexity with multiple tools for Dynamic Select and Dynamic Rename.

 

Screenshot 2024-11-04 090855.png

 

Chris

flying008
15 - Aurora

Hi, @mudith 

 

Another way by use Dynamic Replace tool:

 

录制_2024_11_05_14_45_57_841.gif

Labels
Top Solution Authors