Alteryx Designer Desktop Discussions

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

How to add a row to get a difference between columns of data

cfine
7 - Meteor

I have got the following file I am trying to take the difference between each Type for Cost, Interest and MTM.  I am not sure how best to accomplish this.  

RecordIDTypeCost InterestMTM
1Type 1125125 
2Type 1100100 
3Type 230010050
4Type 2100100 
5Type 350012575
6Type 3100100 
7Type 4125125100
8Type 4100100 
9Type 5125125 
10Type 5100100 

 

I would like it to look something like this.

RecordIDTypeCost InterestMTM 
1Type 1125125  
2Type 1100100  
  2525 Difference
3Type 230010050 
4Type 2100100  
  200050Difference
5Type 350012575 
6Type 3100100  
  4002575Difference
7Type 4125125100 
8Type 4100100  
  2525100Difference
9Type 5125125  
10Type 5100100  
  25250Difference

I appreciate the help with this.  Thank you!

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @cfine 

                 if you use a Multi-Row formula you should get the desired results. I've attached my workflow as well.Multi_Row_Formula.JPG 

john_miller9
11 - Bolide

If you need the output to look the same as you posted, this workflow should get you there.

 

Add Row Get Difference.pngAdd Row Get Difference2.png

cfine
7 - Meteor

This worked great.  One more question for you. What formula could I use in Multi Row to achieve the following:

Record IDTypeCost InterestMTM    
1Type 1100255    
2Type 11002510    
3Type 11002510    
4Type 11002510    
5Type 145010150    
  2505135DifferenceRecord ID 5 minus all others

 

Thank you!

john_miller9
11 - Bolide

I don't think just using a multi-row formula would get you there.  I would approach it like this to get RecordID 5 minus all others. 

Add Row Get Difference3.png

Labels