Alteryx Designer Desktop Discussions

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

Rounding Numbers using a certain condition

B_bhatta
7 - Meteor

There are numbers in Column A of the attached excel with decimal points. Can we using a single formula, achieve the result in "Output Desired" column. I want to integrate two conditions- if there is a number less than 1 or equal to 1, for eg. 0.002,0.5,1 , output should be 1. For others numbers like greater than 1, it should be rounded down to the lowest integer. For eg. 1.6 should be 1, 6.3 should render an output as 6. Can someone help me in integrating this in one formula please? Thanks a lot!

4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @B_bhatta ,

 

the formula you should use would be this one:

 

 

IIF(ABS([Field1])<1, 1, FLOOR([Field1]))

 

 

Untitled.png

 

I've added the ABS just in case the same rule has to be applied for negative numbers

 

Regards

Qiu
21 - Polaris
21 - Polaris

@B_bhatta 
Floor Function is what we need, similar with @afv2688 

0216-BBhatta26.PNG

B_bhatta
7 - Meteor

Thank you it worked! @afv2688 

B_bhatta
7 - Meteor

Thanks! @Qiu 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels