We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Return the Field Name

YLYONG
9 - Comet

Hi 

I have been using excel index match to return the field name of a matching value. Wanting to know how this can be done in Alteryx?

 

Thank you for your assistance

 

Input

ITEMHeight CheckWeight CheckDiameter CheckPassed All ChecksReason for Failing  ( Pick one only)
A101FAILHeight Check
B100FAILHeight Check
C111PASS 
D011FAILWeight Check
E111PASS 

 

 

 

 

Output

ITEMOUTPUT
AFAIL - Height Check
BFAIL - Height Check
C 
DFAIL - Weight Check
E 
11 REPLIES 11
mceleavey
17 - Castor
17 - Castor

Hi @YLYONG ,

 

This is a simple formula:

 

if [Passed All Checks]="FAIL" then "FAIL - "+[Reason for Failing ( Pick one only)] else "" endif

 

mceleavey_0-1643106078940.png

 

Workflow attached. I hope this helps.

 

M.



Bulien

atcodedog05
22 - Nova
22 - Nova

Hi @YLYONG 

 

Here is how you can do it. Is this what you are looking for?

Workflow:

atcodedog05_0-1643106107216.png

 

Hope this helps : )

 

SoccerTil
8 - Asteroid

Or are you looking for a simple lookup and replace. See the widget Find Replace as in this example.

 

SoccerTil_0-1643133388280.png

 

apathetichell
20 - Arcturus

Reading your description I think you want to dynamically pull in to the column heading where you have a 0 but your data doesn't support that hypothesis. The easy way to do that would be to do something like record id and transpose and then declare the reason for failing is whatever is a zero and then cross tab back. There's more nuance to this (like testing if something doesn't fail and writing pass) but that's basically the strategy.

 

Did you mention what happens if there are multiple 0s? Does a zero designate failure and a specific attribute causing that failure?

YLYONG
9 - Comet

 

Thank you for your valuable input @SoccerTil @apathetichell @atcodedog05 @mceleavey 

 

I guess what I want the workflow to do is when an item fails, then dynamically pick the first field as the reason for its failure.

 

For instance, the reason for the failure of item B was Weight Check

 

Input

MHeight CheckWeight CheckDiameter CheckPassed All Checks
A101FAIL
B100FAIL
C111PASS
D011FAIL
E111PASS

 

Output

TEMOUTPUT
AFAIL - Height Check
BFAIL - Height Check
C 
DFAIL - Weight Check
E 
YLYONG
9 - Comet

@apathetichell @SoccerTil @atcodedog05 @mceleavey 

 

Here is the solution:

This simple workflow can potentially be simplified by Cross Tab. 

Happy if anyone wanted to give it a try.

Cheers

 

YLYONG_0-1643602107514.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @YLYONG 

 

If have limited columns you can use the formula tool else if directly.

 

Workflow:

atcodedog05_0-1643608744724.png

 

Hope this helps : )

 

Akash__on
8 - Asteroid

Let's solve it step by step:

  1. We need to find the FAIL candidates and their reasons with the OUTPUT field having FAIL and the reason specified in the input data.
  2. Simply use Formula tool : Apply the conditional statement checking the "passed all checks" field = "FAIL"
  3. If condition is true "FAIL-" + [reasons for failing...] 
  4. Else leave it blank.

Akash__on_0-1643625353162.png

 

I hope that will help.

 

Akash__on
8 - Asteroid

okay, you finally got it.. i only saw the first post.

 

Thanks for posting.

 

Labels
Top Solution Authors