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
RolandSchubert
16 - Nebula
16 - Nebula

Hi @areeba ,

 

you can convert the column to a string data type using the formula ToString([Field1], 0, '.', ',') - you'll have a dot as thousands separator.  

Best,

 

Roland

areeba
8 - Asteroid

Hi @RolandSchubert ,

 

Thank you for replying but can you be more specific with the formula? This formula gives me error Type mismatch:String provided where a number is required.

 

Thanks

Areeba

RolandSchubert
16 - Nebula
16 - Nebula

The target field has to be a string data type. I've attached a sample.

areeba
8 - Asteroid

Hi @RolandSchubert 

 

Your sample has error itself what i am facing.

 

@atcodedog05  Can you please help ?

 

Thanks Areeba

RolandSchubert
16 - Nebula
16 - Nebula

Could you please provide a screenshot of the error? It runs without any problems in my environment.

 

atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1632317932945.png

 

Hope this helps : )

areeba
8 - Asteroid

Hi ,

 

Please find below the screenshot . One thing when i tried opening your sample it gave me warning that my organization is not having the version to which your sample has been created. Do you think this could be the reason ?

 

areeba_1-1632318109698.png

 

RolandSchubert
16 - Nebula
16 - Nebula

It seems, the values in Text Input are not recognized as "numeric". I've added a Select tool to set the data type, try that one.

areeba
8 - Asteroid

Hi @atcodedog05 

 

You rock!

 

it just one thing that in the next step i need to take sum of column Output. when i am doing the sum it is giving me result as 2756.461 which is incorrect . The Sum should be 6.214.

 

Can you tell why i am getting this incorrect sum ?

Labels