Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Find Nearest Rank Question

Brad1
11 - Bolide

For Find Nearest Rank, in the event of a tie, is there a way to force one location to win?  Doesn't matter which one.

 

Example:

Store      Distance     Rank

StoreA    1.5              1

StoreB     1.5             1

StoreC     2.1             3

 

Needs to be:

 

Store      Distance     Rank

StoreA    1.5              1

StoreB     1.5             2

StoreC     2.1             3

 

Thanks in advance.

8 REPLIES 8
NicoleJohnson
ACE Emeritus
ACE Emeritus

Try the Multi-Row Tool, configured as follows:

 

 

multi-row tool.JPG

 

Will check to see if Original Rank of row before it is the same, and then will add 1 to the NewRank value... if the Original Ranks are different, it will leave them as-is. Then you'll use a select tool to swap out the original Rank column for the NewRank one. That should do it? Hope that helps!

 

NJ

gc
9 - Comet

Can you Sort, by distance, then do a Record ID field to get the sequential numbering?

Balders
11 - Bolide

Hi Brad,

 

You can't do it in the tool itself, but with a sort and then a multi-row formula you can differentiate the rows with same ranks. I've attached an example workflow here. I hope it helps :)

 

 

Brad1
11 - Bolide

We never use record IDs here.  I guess because the results are often Client facing.  It's foreign to me because everywhere else - I always used them.  We will be getting in to some self-service apps. etc.  So don't think we can go that way but I appreciate the idea.  Thanks.

Brad1
11 - Bolide

Balders,

 

That's a pretty sweet way to deliver a solution!  I do have my XML View tab set to view.  I guess I could just drop that in but I'm going to try Bolide's solution first - then I'll try yours.  Thanks very much.

Brad1
11 - Bolide

Awesome!  Thank you!!!

Brad1
11 - Bolide

Agree this would work.  Thanks!

Brad1
11 - Bolide

Thanks for your help!!!

Labels
Top Solution Authors