Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Multiply or Divide one column by the next one

vrebelo
5 - Atom

Greeting!

 

I'd like to know if there's a way, maybe using Multi-Field Formula Tool, to divide one specific column to the next(or previous) one, here is an example:

 

 

example1.PNG

 

 

I want to create a new column for each month, with the ratio Tax/Value, so it would look like this:

 

 

example2.PNG

 

 

I know I can do it using Formula tool, but the only way I know how to do it is by creating 1 formula for each month, so if I get extended periods, years, I'd need to do numerous formulas. Is there a faster way of doing that?

 

Thanks in advance!!

2 REPLIES 2
Luke_C
17 - Castor
17 - Castor

Hi @vrebelo 

 

Might have overengineered this, but in order to avoid repeating formulas I prefer to transpose the data into fewer columns. The first portion of the attached transposes the data into 3 main columns: Month, Tax, and Value. Then we calculate the ratio just once based on the columns and get it back into your desired format.

 

 

Luke_C_0-1621611749440.png

 

 

vrebelo
5 - Atom

Thank you, @Luke_C!! I'll try it out!

Labels
Top Solution Authors