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

Column calculation

Andreas92
6 - Meteoroid

Hi,

 

I've been trying to do the following in Alteryx, I've tried working with multi row and multi field formulas but couldn't get anything going.

 

I'm trying to do a simple subtraction between column 2 and 1, and then continuing, 3 minus 2, etc. all this grouped by ID and Country.

 

Is there no current field minus previous field?

 

Thanks!

Andreas

 

 

Andreas92_0-1636045054120.png

 

5 REPLIES 5
PhilipMannering
16 - Nebula
16 - Nebula

HI @Andreas92,

 

It takes a bit of wrangling, but something like this should help. See attached.

PhilipMannering_0-1636046610150.png

 

Andreas92
6 - Meteoroid

Thanks Philip!

 

I just had to change your join to join by ID and Country and not by position.

Andreas92
6 - Meteoroid

Hi @PhilipMannering,

 

I am now trying to do a division between both of those series of columns, dynamically. See below screenshot, I am doing current field / by the Right current field name (1) which refers to the first columns, but I can't make it refer to those previous fields.

 

In the below case, I would need to do -1080 / 1080.12 for France.

 

Andreas92_2-1636369713713.png

 

Thanks!

Andreas

Andreas92
6 - Meteoroid

Hi @PhilipMannering,

 

I am now trying to divide between both sets of columns. I now need to dynamically divide column 2-1 by column 1. See below screenshot. I tried with doing a Right current field name it doesn't work, it's not taking the right side of the division as a field ( [1] ) but rather as a number to be applied for the division.

 

How can I work around this?

 

Andreas92_0-1636377307986.png

 

 

Thanks,

Andreas

PhilipMannering
16 - Nebula
16 - Nebula

Like with the difference, I think you would want to calculate the % difference on the pivoted data using a Multi-Row Tool. See attached,

PhilipMannering_0-1636396090306.png

 

Labels