Alteryx Designer Desktop Discussions

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

Rounding with more than one decimal

GCEagles
Meteoroide

Here is an excerpt of the data that I need to be transformed:

 

CurrentWhat I need
22.1039999999999922.1040
22.1092.1122.1092.11
22.1040.1022.1040.10
22.201499999999822.2015
FH10202020FH10202020
022100210FSB022100210FSB

 

I need to round the first set of decimals to 4 places. The data is currently in string format because I will lose the data with the letters, if I convert to double

4 RESPOSTAS 4
CharlieS
17 - Castor
17 - Castor

I achieved the desired result by splitting to rows on the period, then rounding the values that contained three 9's to the first 4 characters, then recombine the values by concatenating with a ".". 

 

Check out the attached workflow and let me know if that works for you.

 

 

GCEagles
Meteoroide

Hey, sorry I also realized that in some instance there's data that is:

CurrentWhat I need
22.2023000000000000000122.2023

Where now that would be rounded down, so I would just add "000" to the formula?

CharlieS
17 - Castor
17 - Castor

No problem. I added and OR condition that looks for "0000" in addition to "9999" (i also extended to 4 characters).

 

 

GCEagles
Meteoroide

Perfect thank you so much!

Rótulos