Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

multi condition data look up

skindran
6 - Meteoroid

I have a data like this

Input File:
Age BMI
20 18.5
42 32.5

I created a input data
BMIID BMIStart BMIEnd BMIText
1 0 18.4 Underweight
2 18.5 24.9 Healthy Weight
3 25 29.9 Overweight
4 30 39.9 Obese

Now, I need to get the BMIText using the BMI from the file. I tried multiple ways but didn’t help. Can you someone please provide your thoughts?

6 REPLIES 6
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @skindran ,

 

I attached an example workflow that does what you need using the Generate Rows tool and a join.

 

Don't hesitate to ask me if you need more details or have any question.

 

Cheers,

 

Jean-Baptiste

DavidP
17 - Castor
17 - Castor

I would use a formula tool if statement to do this

 

DavidP_0-1591601295708.png

 

CKP
10 - Fireball

Hi @skindran 

 

It looks like you're looking for an equivalent of Excel's vlookup. The closest I've found in Alteryx is the 'Find Replace' tool but that's only for text.

 

The solution I've attached merges all the data together and then filters down to only the rows where the Input BMI sits within the range of the relevant BMIText.

 

Hope this helps.

 

BMIText.jpg

skindran
6 - Meteoroid

Thank you. It works for this. The only challenge would be if we have to lookup big datasets this way,

skindran
6 - Meteoroid

Thank you. It works for this. I earlier tried to append but didnt have filter/formula. So, it didnt get what I needed.

The only challenge would be if we have to lookup big datasets this way,

skindran
6 - Meteoroid

Thank you. It works. I wanted to have this based on the input data, so in future if we need to add additional information, it would be easier to add data to input data and not change the code.

Labels