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.

Ranking

CHandrash12
5 - Atom

Hello All,

 

I am new to alterxy and need an help with below requirement

 

Objective: A company processes ticket requests for an upcoming concert. We can only allocate 200 tickets per day to the requests in the order they were received (request volume is obtained from the [Tickets Requested] field). We have the date the tickets were requested but we need to obtain the order using the logic below and add a column that contains the tickets allocated to each request.

 

The FIRST FOUR characters of the ID field indicate order. Numerical values are ranked higher than alpha characters. The order goes from 0-9 (rank 1-10) then A-Z (rank 11-36) for each position. So if the first 4 characters of the [ID] field are C3N1, the rank for each is 13-4-24-2. That rank would fall below 10-5-30-5 because the first position is ranked lower (13 v 10). However, it would be higher than 13-8-21-1 because the first position is tied (13 v 13) but the second position is ranked higher (4 v 8).


Summary of Data: ID, Date, and quantity of tickets requested.

 

I have attached .yxmxd file. Need help

 

4 REPLIES 4
mutama
Alteryx Alumni (Retired)

Hi @CHandrash12 ,

 

Have you checked out the Getting Started Learning Path under Alteryx Academy here: https://community.alteryx.com/t5/Learning-Paths/Getting-Started-Learning-Path/ta-p/475117 ? The topics covered there can help in your use case.

 

Best,

M

aesanchez
7 - Meteor

Give this a shot. Hopefully, I interpreted the problem correctly. 

 

The approach is to replace the characters with their sequencial value. Afterwards, it allows for numerical sorting of the rows and completes the cycle with the calculations for the maximum daily allocation. 

 

Let me know if there are any questions. 

 

 

Qiu
21 - Polaris
21 - Polaris

@CHandrash12 

Like this?

1115-CHandrash12-1.PNG

mutama
Alteryx Alumni (Retired)

Hi @CHandrash12 ,

 

Try out this solution here (see workflow as attached). The concept here is to use a Mapping Table to dynamically update the rankings of the first 4 alphanumeric characters from the ID column.

 

I've also annotated the steps along the way for easy readibility/interpretation of the workflow logic. Hope this helps! 🙂

 

mutama_0-1608131637506.png

 

Best,

Michael

 

Labels
Top Solution Authors