In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Assign rank based on value

golfromeo
メテオール

Hello all,

 

I'm trying to achieve something as illustrated in the attachment, which is to assign a rank based on a hypothetical value to be looked up in another table.

 

I found a past discussion that almost does what I need it to do [link], but not for the format in which I have my data and I haven't been able to figure out a solution.

 

I would appreciate any help, thank you!

4件の返信4
mceleavey
17 - Castor
17 - Castor

Hi @golfromeo ,

 

those number are not related. Can you explain why the combination of the two inputs would give the output required?

Why is Segment 2 Ranked 5? Why is Segment 1 Ranked 2 etc.

 

We will need to know the logic. Is it the hypothetical sales determine the rank by looking up the closest value in the corresponding segment in Input 1?

 

Thanks,

 

M.



Bulien

Luke_C
17 - Castor
17 - Castor

Hi @golfromeo 

 

I prepared the attached workflow, from what I can gather we're looking for the record that is closest to the hypothetical sales without going over.

 

  1. I join the two data sets based on segement
  2. Then I filter out records where sales exceed the hypothetical sales
  3. Then I sort by segement/sales
  4. Then sample the first record for each sale (the highest sales without going over)

 

Luke_C_0-1623181054044.png

 

golfromeo
メテオール

Thanks for your reply and sorry if I didn't explain it clearly enough at first. The idea is to know what rank would this company have if they achieved sales of a certain amount. For example, in Segment 1, if they achieved sales of 8,500, they would be positioned 2nd replacing Carrier B. In Segment 2, by achieving 7,500, they would be 5th replacing Carrier E. Thanks again.

golfromeo
メテオール

This works, thanks for your help!

ラベル
トップのソリューション投稿者