Free Trial

Alteryx Designer Desktop Discussions

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

Multi row formula Subtraction

koreyfras
5 - Atom
 

I am struggling to get a rolling subtraction in Alteryx for column 'Volume Type I'. I am trying to take the value from 'Volume Type 1' (starting at 3000) and subtract it -100 into a new column while also then taking the new value from the previous row and doing a rolling previous row - 100. In Excel this is obviously easy because I could just drag and copy the formula down, but I am having trouble replicating using the multi row formula tool in Alteryx. Thanks!

 

 

RowVolume Type 1Type 1 Usage in GallonsUsage (New Column)

1

3000

100Row 1 Volume Type 1 (3000) - 100 = 2900
23000100Row 1 Usage (2900) - 100 = 2800
33000100Row 2 Usage (2800) - 100 = 2700
43000100Row 3 Usage (2700) - 100 = 2600
53000100Row 4 Usage (2600) - 100 = 2500

 

 

 

 

Subtraction.JPG

2 REPLIES 2
griffinwelsh
12 - Quasar

@koreyfras see the attached solution

koreyfras
5 - Atom

Thank you! This is exactly what I needed, but now I am having problems when I'm trying to apply it to a bigger subset of data. 

 

I have multiple cities within the data set, and each has a different starting amount for Volume. Is there a way to get it to basically start over the calculation with each new city? See the table below for what I am hoping to replicate. I've attached the workflow and a screenshot. 

 

CityVolume Type IType I Usage in GallonsUsage
AMA60001005900
AMA60001005800
AUS30001002900
AUS30001002800
Labels
Top Solution Authors