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

Identify Non Whole Numbers

reginawhelan
8 - Asteroid

Hi, I need help with a formula. I need to identify any cells that do NOT have a whole number. Any suggestions? 

14 REPLIES 14
Jonathan-Sherman
15 - Aurora
15 - Aurora

Have I missed something or could we not use a regex_match function here?

 

IF REGEX_Match(ToString([Numbers]), '\d+')
THEN 'Whole'
ELSE 'Not Whole'
ENDIF

 

 

Jonathan-Sherman_0-1601991942854.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

 

TomWelgemoed
12 - Quasar

Hi @reginawhelan ,

 

I think @atcodedog05's solution was the right idea - I would just write the calculation a little different - like so: 

 

if [Field1]/floor([Field1])=1
then 'Whole'
else 'Not whole'
endif

 

But it's a subtle difference only, think it's about preference. Would love to see why that (or the above) solution does not work in your case, so let us know maybe with how it fails if it still doesn't work.

 

Regards,

Tom

reginawhelan
8 - Asteroid

Thank you all for your help!

atcodedog05
22 - Nova
22 - Nova

Did it solve @reginawhelan ?

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @reginawhelan 

 

Cheers and happy analyzing 😀

Labels