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

Using the parse tool - to remove leading decimal

kadenemcintosh
7 - Meteor

 

 

I am using the parse tool to remove leading decimals. The result is Null on negative numbers and whole numbers.

 

 

Parse (^\d+\.\d\d) using this function 33563.03333  Result 33563.03. This result works.

 

-33563.03333  Result Null

43 Result Null

 

Please help.

 

 
 
 
3 REPLIES 3
CharlieS
17 - Castor
17 - Castor

You could use this which puts an "or" condition in there::
(^\d+\.\d{2}|^-\d+\.\d{2}|\d+)

 

kadenemcintosh
7 - Meteor

 

What is the function for the whole number and numbers with one decimal place, the result is still Null

 

For example

Whole number  43 result Null

                         43.1 result Null

 

Is there an option for no decimal?

T_Willins
14 - Magnetar
14 - Magnetar

Hi @kadenemcintosh,

 

As much as I like RegEx (see this week's Weekly Challenge #188), this can also be done in a formula tool.

 

Limit Decimals without rounding.JPG

 

Labels
Top Solution Authors