Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Simple vector math in Alteryx


Hi colleagues,


I have a large set of vectors pairs, each 500 long.  For example:

VId,   Dim001,   Dim002,   Dim003.... Dim500

1,     0.500     0.200     -0.500    1.100

2,     0.200     0.400     -0.300   -1.000

3,     0.100     0.100      0.100    0.200

And do on for a few hundred thousands of rows.


I would like to figure out the absolute difference between rows 1/2, 3/4, etc.  For example, I would expect the following outcome:

VId,   Dim001,   Dim002,   Dim003.... Dim500

1/2,   0.300     0.200,    0.200..... 2.000


I could also easily pass the data in as the two vectors to be compared being on the same row.  


Thoughts?  Do I need to drop into R, or is there a clever way to get Altyerx working for this problem?


Kai :-)


My thought would be:




First to transpose the dataset.

You can then define the calculation in a text input

A couple of joins and then a crosstab to produce the output


I expect would be pretty quick at scale you described


Wow...I forgot the basic rule of Alteryx: Is something is too complex, just break it down into pieces.


Thank you!  Will test this out later today and confirm!


Kai :-)