Calling all Alteryx customers: Refer your colleague to try Alteryx and receive a $50 gift card. Sign up now!
Free Trial

Alteryx Designer Desktop Discussions

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

Round to two decimal places

jagjit_singh
8 - Asteroid

Hi,

 

I have the below table and want to round Rent Balance to two decimal places and the result should match as in the Required column. I tried using the Round function but that does not give the desired result. Any ideas how I can use a formula or tool to achive this please.

 

 

Rent Balance

Required

356.4785714

356.48

356.4785714

356.48

356.4785714

356.48

329.0571429

329.06

301.6357143

301.64

274.2142857

274.21

246.7928571

246.79

219.3714286

219.37

191.95

191.95

164.5285714

164.53

521.0071429

521.01

521.0071429

521.01

493.5857143

493.59

466.1642857

466.16

 

 

Thanks

Jag

12 REPLIES 12
Present_guy
8 - Asteroid

Thanks, 

A caution: Using this approach will convert null values to 0s. To keep these as null values, you'll need to use another multi-field tool to convert them back to null: 

 

IF [_CurrentField_] = 0 THEN Null()
ELSE [_CurrentField_]
ENDIF

PDempsey
7 - Meteor

I have my amounts in the format 51100500.55 (data type = Fixed Decimal) but I need to add thousand separators and retain the preiod and 2 decimal places. I am stumped.

 

PDempsey
7 - Meteor

Soon as I typed this it came to me, so simple. ToString([NA 2], 2, 1)  

NA 2 being my fieldname.

Hope it helps someone.

Labels
Top Solution Authors