We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Round Off number even if data type is string

KamenRider
11 - Bolide

Hi

 

I have some inquiry here whose data type is string. The conditions is to round off number to 5 decimal places. However if the content is "Price", it should be retain as is and if it is null then as is also. Below is an example.

 

xxx.PNG

I would like results to look like this.

 

round.JPG

Hope to hear from anyone.

Kamen

3 REPLIES 3
SPetrie
13 - Pulsar

Try this formula if REGEX_Match([Price],".*\d.*") then tostring(round(ToNumber([Price]),0.00001),5) else [Price] endif

grazitti_sapna
17 - Castor

Hi @KamenRider 
I have made workflow for your use case.
Hope it works for you
Thanks

Sapna Gupta
KamenRider
11 - Bolide

Thank you so much. Your formula works.

 

Kamen

Labels
Top Solution Authors