In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Round of decimal values in double

hegdepavithra10
9 - Comet

Hi, 

 

I have field that is imported from Excel. The default data type assigned to this field was v_string. The value on alteryx looked in exponential format. So I tried to convert it into fixed decimal format. But the value displayed in null. Hence I converted it using double. Now the issue I am facing, is some values have 4 digits after decimal and some have 5,6,7. I want this to be uniform. Can someone help with this.

6 REPLIES 6
JosephSerpis
17 - Castor
17 - Castor

Hi @hegdepavithra10 you can use the Round function in the formula tool to round to certain decimal point e.g Round(Field,0.01) will round to two decimal places.

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Can you please provide a sample file and what is the expected output we can look into it.

hegdepavithra10
9 - Comet

So the value looks like 1.000000009999999999999E-4,this is v_string format. I want this to be converted to a proper decimal field with uniform rounding off. After I have used double the values are - 0.0014101, 0.00141.

 

I just need them to rounded off uniformly across all the values.

JosephSerpis
17 - Castor
17 - Castor

Hi @hegdepavithra10 I mocked up a workflow that showcases how to do that. Let me know what you think?

hegdepavithra10
9 - Comet

hi,

 

i tried the solution you have provided. I used round([Field],0.0001). This however, turned some of the values into 0.001 and others to 0.0001. Can this be made uniform?

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Here is what you can do

 

Set datatype to Fixed:Decimal like below

atcodedog05_0-1604570858818.png

Scale is number of decimal points

Output:

atcodedog05_1-1604570921474.png

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

Labels
Top Solution Authors