Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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
20 - Arcturus
20 - Arcturus

@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 

Labels