Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Help!!!

Ej_1947
6 - Meteoroid

Hi everyone,

 

I hope you are all keeping well.

I need help with creating sort and assigning values within a dataset table please. I have tried to do this in Python using Pandas and it has worked but with millions of rows the code it is taking days to run in Pycharm and this makes it next to impossible to iterate in good time. I now want to do this with Alteryx using yxdb output but I do not know how to do this in Alteryx. What tools, formulas or workflows may help? I will appreciate help with this.

 

I will do my best to be very clear, I will use the sample table in the screenshot to explain and illustrate. The last rightmost field is the proposed answer/solution:

 

Ej_1947_1-1585558291916.png

 

Using the column named 'Key' as the reference; where columns A, B and C are the same, and column 'Driver X' has the same first numbers before the decimal point, create a new column 'New Key' that assigns the values with the lowest decimal point to all the values in column 'Key' within the group. When looking at 'Driver X' note that where A, B and C are the same, values in the 'Driver X' column are grouped i.e 10.1, 10.2, 10.3. 10.4 make one group; the number value with the lowest decimal point for this group will therefore be 10.1, so assign the value in the field 'Key' that has 10.1 as Driver X to all the other values of in the 'Key' field that share the relevant 'Driver X' group. 

 

I have also attached the file.

Thanks in advance.

4 REPLIES 4
Genevieve
8 - Asteroid

 Hi @Ej_1947 

 

After sorting your columns I split your driverX colum between the useful parts. Then used the mutlirow tool to compare the values between rows.

The filter at the end is to catch the errors. You have data with the same part1 of DriverX but different keys.

The workflow is attached. I hope this helps.

 

 

ydmuley
12 - Quasar
12 - Quasar

Hello @Ej_1947 

 

Please find attached potential solution to solve your problem, do let me know if it helps.

 

Thanks,

Yug

Regards,
Yugandhar Muley (Yug)

Alteryx ACE | Alteryx For Good India Lead | Bengaluru Alteryx User Group Lead
Ej_1947
6 - Meteoroid

Thank you very much Yug!

Ej_1947
6 - Meteoroid

Thank you Genevieve, much appreciated!

Labels
Top Solution Authors