Alteryx Designer Desktop Discussions

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

How to Update Multiple Fields to Divide Two Rows

dishamishra
7 - Meteor

Hi Alteryx Experts! 

Does anyone know how I can divide two rows of data to calculate a metric? I have attached a file where I have a title in the "Line Item" column for "Result," but I want to update all the values below each of the months so that I divide the numerator row by the denominator row. Any ideas would be super helpful and appreciated!

 

Divide.PNG

9 REPLIES 9
joshuaburkhow
ACE Emeritus
ACE Emeritus

Sure there is actually multiple ways to do this. Here are just two quick and dirty methods

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
JosephSerpis
17 - Castor
17 - Castor

I mocked up a workflow let me know what you think?

Kenda
16 - Nebula
16 - Nebula

Hello @dishamishra 

 

@patrick_digan made this awesome tool called the Multi -Row -Field -Column Formula. Basically it acts as a combination of the Multi-Row tool and the Multi-Field tool. It is helpful here because you want to perform the same calculation that uses multiple rows in multiple fields. 

 

Kenda_0-1597319536525.png

 

grazitti_sapna
17 - Castor

Hi @dishamishra,

 

Here is my take on your problem. I hope it helps.

 

result1.png

 

 

 

Sapna Gupta
dishamishra
7 - Meteor

Thank you Joseph! The logic for your workflow makes perfect sense to me, but when I get to the "Multi-Row Formula" step, my "Results" column returns null values throughout. I followed the same configurations you used in your mock up. Any reason for why this might happen (nulls)?

dishamishra
7 - Meteor

Thanks for your quick response! I'm trying out some of the other methods listed here too to see which works best!

dishamishra
7 - Meteor

This is very cool - thanks for sharing! I'm fairly new to Alteryx, but are these developed tools usually available for everyone to use? Or are they beta version ?

Kenda
16 - Nebula
16 - Nebula

@dishamishra It is not part of the Alteryx set of tools, it is just a macro that my colleague created. You can download it here to add it to your tool palette: https://gallery.alteryx.com/#!app/Multi-Row-Multi-Field/5da9d45e0462d7179c6316cf

dishamishra
7 - Meteor

@grazitti_sapna wrote:

Hi @dishamishra,

 

Here is my take on your problem. I hope it helps.

 

result1.png

 

 

 


Thank you for your solution! This one worked perfectly. I also added a ROUND function in the row formula, as Joseph suggested above and I got exactly what I wanted. Thank you!!

Labels