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

How to apply XLOOKUP in Alteryx

Miki2021
8 - Asteroid

I have to consolidate a sales report by combining two datasets together.

 

Dataset A: 

 

Order number Amount Currency
10000110000USD
10000220000USD
10000310000USD
10000420000USD
10000510000USD

 

Dataset B:

 

Order number Order itemOut of stock Payment issue Delivery issue
100001aYY 
100001b Y 
100001cY  
100002a   
100002bY Y
100003a   
100004a Y 
100004b  Y
100005aY  

 

Dataset B is a bit more detailed as it carries information about each order item and the associated order issues.

 

Historically, I tried to use XLOOKUP to get an output on the orders and order issues, without the order item details. 

 

Expected outcome: 

Order number Amount CurrencyOut of stock Payment issue Delivery issue
10000110000USDYY0
10000220000USDY0Y
10000310000USD000
10000420000USD0YY
10000510000USDY00

 

However, I recognize XLOOKUP has its limitations. Just wonder if there are smarter ways to get the same output by leveraging Alteryx?

15 REPLIES 15
Miki2021
8 - Asteroid

@HomesickSurfer Thanks a lot for your solution. 

Miki2021
8 - Asteroid

@HomesickSurfer The original data is a string. Will numeric value matter?

HomesickSurfer
12 - Quasar

@Miki2021 , you are welcome.  Do let me know if any of your values are other than a 'Y'.  If so, example, 'N/A' or X, etc...a summary using MAX may yield undesirable results - hence use of 'Contains()'

Miki2021
8 - Asteroid

@HomesickSurfer Thanks for the reminder! I dun have N/A or X in the field. Do you mean that if there is another string character e.g. A, the MAX will pick up another value?

Jean-Balteryx
16 - Nebula
16 - Nebula

@Miki2021 the Max will pick up the last value in the alphabetical order. So if you have something that is after "Y" alphabetically, it will be taken instead of "Y".

HomesickSurfer
12 - Quasar

'MAX' returns the highest Alphanumeric value.

 

MAX of the below returns:  ZZZ

 

0
1
2
3
A1
1A
C3
3C
YY
Y1
Z
YYY
N/A
ZZ
ZZZ
Z11

Labels
Top Solution Authors