Alteryx Designer Desktop Discussions

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

Rounding to thousandth decimal using select

elfr232
5 - Atom

Hi! This may be a super simple fix, but I am wanting to round values such as 3.71429606 to the third decimal place (3.715) using select. It has a v_string type and the size is 255 

 

What do I do?

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@elfr232 

Change to 19.3 for example?

Qiu_0-1613450022904.png

 

grazitti_sapna
17 - Castor

Hi @elfr232,

 

I guess there are multiple ways to do this but these are the two ways that I find feasible.

 

1. Change the datatype to fixed decimal 19.3 using select.

 

grazitti_sapna_0-1613452767665.png

 

2. If there are multiple fields that needs to be converted into decimal up to 3 decimals and you want datatype to be string. ( In case you want the workflow to be dynamic)

grazitti_sapna_1-1613453060125.png

 

3. Use Multifield formula for multiple column.

grazitti_sapna_2-1613453116995.png

 

If this is what you are looking for kindly give this a like and mark this post as solution.

 

Thanks

 

 

Sapna Gupta
pedrodrfaria
13 - Pulsar

Hi @elfr232 

 

I see some of my peers have provided you with solutions. But to make sure you do not lose data that you do not want to, be aware that rounding using the select tool will not round up or down, it will just eliminate the digits that are not within the scope. 3.71429606 will turn into 3.714 for example. If you need to actually round it up, using the:

 

Round([Field],'0.001') function in the formula tool 

 

This will you will make sure to properly round everything.

 

Pedro.

Labels