Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Compare two columns and return the Lower one with 3rd column output

smfhsan2005
8 - Asteroid

Hello Experts, I am new to Alteryx,  I have a tasks of comparing two columns  and return with the 3rd column vaue which has the lowest of the value..any help will be highly appreciated.

 

eg..If Column B2 >90% in this case(96.45) is greater than A2(84.26) then jump to value of column B which has less than90% in this case B3 and return value from Colum A ML60161 and if Column B already less than 90% then return Same name as Column Name.

 

 

NameABEnd result
ML0310984.2696.45ML60161
ML6016176.4188.42ML60161
ML0311080.2493.42ML03121
ML5475566.2996.33ML03152
ML1710356.3395.02ML03121
ML0312129.8183.58ML03121
ML0315245.5273.03ML03152
ML1310741.3981.55ML13107
ML0311140.0284.83ML03111
28 REPLIES 28
geraldo
13 - Pulsar

Hi,

 


This table has a certain number of rows or is it dynamically increasing regularly

 

[]

benakesh
12 - Quasar

Hi @smfhsan2005 ,

There is one difference  in my result . Can you  explain your logic  for  4th row ?

clipboard_image_0.png

smfhsan2005
8 - Asteroid

For now its only few rows, but it will increase dynamically.

smfhsan2005
8 - Asteroid

4th row should show the name from column "name" related to the value which has less than 90% of column B.

benakesh
12 - Quasar

Row 6   col  B value  ( 83.58)  is    <  90 % .  Your results  shows  row  7 value   .  Is there a reason  you skip row  6  and  pick

row  7  ?   

smfhsan2005
8 - Asteroid

Hello @benakesh. thanks it helped me 90% as per your genuine question yes.the second part of this task is checking the distance between 2 names in Column "name" which is nearest one to each other will become the criteria for 4th column. here we can consider atleast within 2 miles.

 

CascadeLatitudeLongitudeABCEndresult
ML0310943.090194-87.96597284.2696.4598.79ML60161
ML0311043.07121-87.9534580.2493.4298.61ML60161
ML0311143.11725-87.9304440.0284.8396.06ML03121
ML0312143.07941-88.004329.8183.5894.96ML03152
ML0315243.08595-87.92521745.5273.0398.87ML03121
ML1310743.09686-87.9847141.3981.5594.64ML03121
ML1710343.115014-87.96494756.3395.0298.55ML03152
ML5475543.074108-87.97607866.2996.3396.3ML13107
ML6016143.098492-87.9424576.4188.4297.26ML03111
geraldo
13 - Pulsar

Hi

 

 

Here's an example that might fit the number of dynamic lines.

 

 

attached workflow

[]

 

 

smfhsan2005
8 - Asteroid

No there is no particular reason behind it..it should be in sequence which has less than 90%.

 

I am really sorry for not able to communicate exactly but my complete task is like below...I 

 

Here is the Algorithm: 

1st case : if B value is >90% and also >A then D should have the Name which is < 1 miles from B. in continuation to this scenario we have

2nd case: if C value is >90% and also >B then E should have the Name which is < 1 miles from C but in this case C and B are mostly >90% but I need the formula for it in future use.

Note: It will be ok if the names been repeated within 1 mile.

 

NameLatLongABCDE
ML0310943.090194-87.96597284.2696.4598.79ML60161 
ML6016143.098492-87.9424576.4188.4297.26ML60161 
ML0311043.07121-87.9534580.2493.4298.61ML03121 
ML5475543.074108-87.97607866.2996.3396.3ML03152 
ML1710343.115014-87.96494756.3395.0298.55ML03121 
ML0312143.07941-88.004329.8183.5894.96ML03121 
ML0315243.08595-87.92521745.5273.0398.87ML03152 
ML1310743.09686-87.9847141.3981.5594.64ML13107 
ML0311143.11725-87.9304440.0284.8396.06ML03111 
smfhsan2005
8 - Asteroid

Thanks Gerarldo. this helps but unable to get it with nearest location. 

Labels