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.

Alteryx Designer Desktop Discussions

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

VLOOKUP as range in multiple data source

monish_chandra
8 - Asteroid

I have two data sources, the first one has a list of CPT codes, and the other one has a list of range and a category name for that range of values. I'm trying to write a workflow which will loop through each of the CPT codes in the first data source and search if it falls between any of the start and end points in the second data source and retrieve the Category value.

 

Data source 1

 

CPT code

10388
39000
99048

 

Data source 2

 

StartEndCategory
1000020000General Medicine
2000140000Anesthesia 
9000099999Radiology
3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

Hi @monish_chandra 

 

One approach you can use is to leverage the generate rows tool to make a record for each code within the ranges provided, then join those new rows against the codes you're looking up.

 

Luke_C_0-1617656921847.png

 

fmvizcaino
17 - Castor
17 - Castor

Hi @monish_chandra ,

 

Here is a suggestion for you.

fmvizcaino_0-1617657012211.png

 

 

 

Best,

Fernando Vizcaino

Austin004lasrado
8 - Asteroid

Hello @fmvizcaino and @Luke_C ,

 

I need similar solutions but i have Date range instead of numbers. below is the two files we have and i am trying to find the Place a person travelled in the particular month.

File 1  File 2
Headder 1Month  Headder 1Start monthEnd MonthPlace
Mr.AMar-22  Mr.A01-02-202228-02-2022Mangalore
Mr.AApr-22  Mr.A01-03-202230-04-2022Bangalore
Mr.AMay-22  Mr.A01-05-202230-05-2022Hyderabad
Mr.BMar-22  Mr.B01-03-202230-04-2022Bangalore
Mr.BMay-22  Mr.B01-05-202230-05-2022Hyderabad
Mr.CMar-22  Mr.C01-03-202231-03-2022Bangalore
Mr.CApr-22  Mr.C01-04-202230-04-2022Hyderabad
Mr.CMay-22  Mr.C01-05-202231-05-2022Chennai
Mr.CFeb-22  Mr.C01-02-202228-02-2022Bangalore

 

I am looking to get below result. Can you please help us here.

 

Headder 1MonthResults
Mr.AMar-22Bangalore
Mr.AApr-22Bangalore
Mr.AMay-22Hyderabad
Mr.BMar-22Bangalore
Mr.BMay-22Hyderabad
Mr.CMar-22Bangalore
Mr.CApr-22Hyderabad
Mr.CMay-22Chennai
Mr.CFeb-22Bangalore

 

Labels