Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

How to RoundUp?

KarlWang
7 - Meteor

 

I saw there are functions CEIL() can change data from ceil(6.54) to 7 and  Floor(6.54) to 6.

 

I would like to use roundup() functions.

Such as:

324 to 400

3425 to 4000

3425.123 to 4000

 

Anyone know how to do it? Thank you.

 

13 REPLIES 13
KenMorrill
7 - Meteor

Assuming your data in is [Value]

 

IF [Value] - FLOOR([Value]) = 0 THEN [Value] ELSE FLOOR([Value]) + 1 ENDIF

apathetichell
19 - Altair

@KenMorrill  try these two:

ceil([unit price]*100)/100

if regex_match(tostring([unit price]),".*\.\d{2}.*[987654321]+$") then (floor([unit price]*100)+1)/100 else [unit price] endif

 

phottovy
13 - Pulsar
13 - Pulsar

Just for fun, here is my dynamic formula that I believe works with all lengths:

 

 

Round([Value], ToNumber(PadRight('2', Length(ToString([Value], 0)), '0')))

 

Edited:

@dataMack I was able to round up using a 2 in front of my multiple using the round formula. I don't know if it would work in every situation but it worked with every number I tested including rounding 900 up to 1,000

 

 

boglarkalipka
8 - Asteroid

sorry, wrong post

Labels