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

extracting positive values

ABC_Anonymous
7 - Meteor

Hello

 

I wanted to share a little exercise with you!
In fact, I'll need to start from the field column and extract the first value greater than 0 if it exists, otherwise 0.

 

IDFieldoutput
xxxxxxxxxxxxx0,1,3,4,101
yyyyyyyyyyyyy0,0,0,0,00
zzzzzzzzzzzzzzz3,5,9,103

 

Thanks for your support

2 REPLIES 2
alexnajm
18 - Pollux
18 - Pollux

Done!

ABC_Anonymous
7 - Meteor

I found this solution : 

IF isEmpty(REGEX_Replace([Field], "0|,| ","")) THEN '0'
ELSE
left(Replace([Field], '0,', ''),1)
ENDIF

Labels
Top Solution Authors