Free Trial

Alteryx Designer Desktop Discussions

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

Rounding Decimal to 1 if condition

Richie059
7 - Meteor

Richie059_0-1660580002816.png

Hey guys, I need help. How can I only round numbers that are .999 to 1. Thanks for the help

 

3 REPLIES 3
IraWatt
17 - Castor
17 - Castor

Hey @Richie059,

I would probably use a Formula Tool here. Here is an example formula:

IF left(ToString([Field1]),5) ="0.999" THEN 1 else [Field1] ENDIF

It checks if the first 5 characters equal 0.999 IF yes then 1 else keep it the same.

 

IraWatt_0-1660580472504.png

The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

Richie059
7 - Meteor

Hey thanks for the quick reply! Unfortunately, that didn't work at all.

 

IraWatt
17 - Castor
17 - Castor

@Richie059 worked fine for me as you can see in the example workflow. Can you be more specific?

Labels
Top Solution Authors