ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Round down to whole from decimal

DanielCarro
アステロイド

Hi guys,

 

I am struggling to obtain the whole number by rounding down.

 

So I have the following

Data I haveI need to obtain this result
5,544,857.08115,544,857
-83,654.2524-83,654
5,461,202.82875,461,202
1,164,419.9870311,164,419
-17,567.393004-17,567

 

I tried using FLOOR() and Round([Field]-0.001.1), not working.

 

Any suggestion where I might be wrong.

 

Much appreciated your assistance.

 

Regards,

Dan

2件の返信2
FinnCharlton
パルサー

Hi @DanielCarro , floor() isn't working for you because your're not always trying to round down. For the negative numbers, you're trying to round up. For example, -83,654.2524 round UP to -83,654, as -83,654 is bigger than -83,655.

 

To get the result you're looking for, try this formula:

 

floor(abs([Data])) * if [Data]<0 then -1 else 1 endif

 

Hope this helps!

DanielCarro
アステロイド

Hi @FinnCharlton , it worked. Thank you very much

ラベル
トップのソリューション投稿者