Alteryx Designer Desktop Discussions

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

Subtracting ROW-1 in Column A with ROW-2 in Column B (A2-B1)

Anaz_S
6 - Meteoroid

Hi,

 

I want to subtract 2 numbers in the below format

 

Thank you in advance

 

ABDifferenceFormula
79238-14252-238' (A2-B1)
252385-15400-385'
40098  
5 REPLIES 5
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Anaz_S ,

 

the Multi-Row Formula tool should solve the problem - attached a sample workflow.

 

Hope this is helpful.

 

Best,

 

Roland 

afv2688
16 - Nebula
16 - Nebula

Hello @Anaz_S ,

 

you could use the multi-row formula for that.

 

IIF(IsNull([Row+1:A]),0,[Row+1:A]-[B])

 

Didn't know what you wanted to do with the last value so I did put a 0 in it.

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Anaz_S
6 - Meteoroid

Getting the below error

 
 
 
 
 

Formula: invalid type in subtraction operator in Multi-Row function
Tried typing - manually and tried selecting the operator field and selected subtraction (once subtraction is selected automatically the - symbol will reflect in the expression)

(Is it any configuration issue)
The subtraction operator is  working properly in Formula function

afv2688
16 - Nebula
16 - Nebula

Hello @Anaz_S ,

 

Put a select tool before the multi row and check the data types, they should be numeric both columns.

 

Regards

Anaz_S
6 - Meteoroid

Solved
Thank you @ and @

Labels