Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to check if values in a cell are numeric or contains only numbers using formula tool

Vaib
8 - Asteroid

Hello,

 

How to check if values in a cell are numeric or contains only numbers using formula tool?

10 REPLIES 10
Luke_C
17 - Castor
17 - Castor

@Vaib 

 

There is a 'isnumber' function you could use:

 

Luke_C_0-1616616376202.png

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @Luke_C,


I wasn't aware that there is a formula like this.


Thank you for sharing. 

Vaib
8 - Asteroid

The isnumber function doesnot seem to be working for me. I have date in the cell that I am looking at in the following format 20200331 (yyyymmdd). I just need to check if the value 20200331 is numeric or not.

Luke_C
17 - Castor
17 - Castor

@Vaib 

 

Can you share the workflow or some sample data? I don't seem to be able to reproduce the behavior you describe.

Vaib
8 - Asteroid

So these are dates parsed in from from a csv file and they show up in the text format. Below are few examples of the dates that I am looking at:

20220228
20200331
20270220
20161001
Vaib
8 - Asteroid

The format of data is V_String

Luke_C
17 - Castor
17 - Castor

@Vaib 


Ah, if they're coming in as text fields you could try the 'IsInteger' function. That would check if it would be able to be converted to a number. See attached example.

Vaib
8 - Asteroid

This is really helpful. Thank you for guiding me through this!

amjadmanasra
8 - Asteroid

Hello everyone, 

I want to highlight IsNumber check the field data type, not the value itself 

to check if the value is a number use RegEx instead something like this :

 

REGEX_Match([F], "^-?\d+(\.\d+)?$")

Labels
Top Solution Authors