Alteryx Designer Desktop Discussions

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

Rounding and Decimals in output

areeba
8 - Asteroid

Hi ,

I have following data in column Field1 and want it to print in column Desired_Output. Please note my Feild1 is of Double data type

 

Field1

43.36275

1580.5988

2756.38083

490.52579

899.33922

14.73303

787.32983

43.4266

 

 

Desired_Output

43

1.581

2.747

491

899

15

787

43

 

How can i achieve it ?

 

Regards

Areeba

19 REPLIES 19
atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

If you use formula like this it will give you sum as 6.

 

atcodedog05_0-1632318989080.png

 

Hope this helps : )

areeba
8 - Asteroid

Hi @atcodedog05 

 

No the sum is not correct. It has to be 6.214

atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

Can you recheck the numbers 😅

areeba
8 - Asteroid

@atcodedog05 

 

Hey i got the solution

 

Thank you so much for help 🙂

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @areeba 

If my response helps please don't forget to mark it as solution.

Cheers and have a nice day!

areeba
8 - Asteroid

Hi @atcodedog05 

 

I have notice one thing when i applied this solution.

It is giving me correct result if output is  6.214 but if the output is 6.210 then it is returning 6.12 or if the output is 5.20 then it results as 5.2

 

why is it omitting 0 as a last digit? what should i do to fix this?

 

Regards

Areeba

 

atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

Its caused because of rounding. If you fixed decimal datatype instead of double it will always have fixed number decimal digits.

 

Hope this helps : )

areeba
8 - Asteroid

Hi @atcodedog05 

 

After using Fixed Decimal Datatype (19.3) i got below result.

areeba_0-1633525806918.png

 

 

expected one is:

areeba_1-1633525935499.png

how should i fix it ?

 

Regards

Areeba

atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

Sadly that's not possible either ending 0 will be removed or decimal places will be fixed there is no way to get an intermediate solution.

areeba
8 - Asteroid

Hi @atcodedog05 

 

oh ! Thats really sad.

 

Please let me know if you find or get the solution.

 

Regards

Areeba

Labels