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

Extract first 4 decimal places digit with the whole number part from a given Integer

cs2kiit17
5 - Atom

Hi All,

I want to use regex tool or any other optimized method to get the whole number part with the 1st 4 decimal places digit of the corresponding integer.

Sample:

Input ValueOutput Value
11
0.5666123450.5666
1.451.45
0.1234567891289088880.1234


Please Note: Using Select Tool to convert the datatype into FixedDecimal(19,4), is rounding the values. So need the solution without any rounding-off.

3 REPLIES 3
messi007
15 - Aurora
15 - Aurora

@cs2kiit17,

 

Please see below :

 

messi007_0-1655740739504.png

 

Attached the workflow,

Regards,

cs2kiit17
5 - Atom

@messi007


Thank you!
Can you also please help me understand the regex formula you have used.
P.S. I am new to regex formulas.

messi007
15 - Aurora
15 - Aurora

@cs2kiit17,

 

Please see below :

 

 

\d+ : One degit or more
.\d{4}: 4 degit after the dot
|: OR
\d+ : one degit or more (In case you have an integer)

 

 

Happy to help!

Regards

Prime Analytics loves Alteryx.png

Labels