Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Pick the largest of a set of items

Hello,

 

I would like to take the following data:

 

SKUanatomy2 Sum_sales 
@804-03-021KNEE                  323
@804-03-021SHOULDER              2,040
@506-03-138SHOULDER          154,922
@506-03-138KNEE                  523
@520-50-220SHOULDER          317,531
@520-50-220KNEE                  900

 

and take the largest sales value and use it to determine which anatomy should be used for the SKU:

 

SKUanatomy2
@804-03-021SHOULDER
@506-03-138SHOULDER
@520-50-220SHOULDER
3 RESPUESTAS 3
Prometheus
Cuásar

@Erick_Reyes101 The first thing I did was clean up the Sum_sales field. Because it has commas in it, it came in as a String with leading spaces. I used a Formula tool with this expression to trim and remove commas: Replace(Trim([ Sum_sales ]), ',', ''). After that, I used a Select tool to change the data type of Sum_sales to Int32, sorted descending on Sum_sales, then used the Sample tool to select First 1 why grouping on SKU. 

Trim Sum Sales.PNG

String to Int.PNG

SKU Output.PNG

binuacs
Polaris

@Erick_Reyes101 Another method

image.png

thanks to you both! 

 

i think both would work for my problem, thanks for the help!

Etiquetas
Autores con mayor cantidad de soluciones