We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Multi-Row formula

Carlyn
8 - Asteroid

Hi,

I am not sure if the Multi-Row formula tool is the best option for what I am trying to do, so please let me know if you would suggest another solution. 

I am trying to find a way to add a specific REF to 3 rows dependent on the values. I have attached a sample, in this example, the smallest value being  -4,654,377.93 in this one, is always a 1, the middle value is always a 2 and the largest value is also a 6. 

 

BancoFecha Importe DESIRED REF
ICBC07/03/2025-              4,654,377.931
ICBC07/03/2025-                  977,419.372
ICBC07/03/2025-                  139,631.346

 

I was thinking that if I used the Multi-Row formula to add a column that identifies the largest to smallest and then I can use this to look up the REF. 

 

This will always be 3 rows of data and the same REF, just different values, as I am filtering out this data within a bigger workflow to deal with the issue in isolation and to try and keep it as straightforward as I can, which is ironic as I think I might be overcomplicating it :-)

5 REPLIES 5
tisha56morris
5 - Atom

Facing same issue here. Help is appreciated.

davidskaife
14 - Magnetar

Hi @Carlyn 

 

I may be missing something here but keep it simple - sort the values in ascending order, and using a Join tool to add in a pre-laid out Ref field (joining by record position, not specific fields)

 

Capture.PNG

aueranna
5 - Atom

he user is seeking assistance in assigning specific REF values (1, 2, and 6) to three rows based on their values, where the smallest value receives a “1”, the middle value receives a “2”, and the largest value receives a “6”. They are unsure if the Multi-Row formula tool is the best approach and are open to alternative solutions. They have provided a sample for reference.

 

Geometry Dash

Gaurav_Dhama_
12 - Quasar

This can be done by just sorting the values, since there will always be three values, you can sort the values then assign record id, if record ID is 1, then it is 1, if recordID is 2 then its 2 else it is 6.

 

Attached is the workflow doing the same.

mceleavey
17 - Castor
17 - Castor

@Carlyn , I've accepted @davidskaife 's response as the solution as given the provided logic, this would be the easiest to change if the parameters shifted, and it's also the easiest to explain. Put simply, joining on record position is simply assigning the number to position after sorting, which means you could always add more rows without changing the logic or having to amend a formula.

 

M.



Bulien

Labels
Top Solution Authors