In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more 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
19 - Altair
19 - Altair

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