We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Error dividing by 0 - how to remove error message

Meiye
7 - Meteor

Hi all, 

 

When I run the workflow it produces error messages when for dividing by 0 (amount exceeding error message limit), but it outputs everything normally and doesn't effect anything else. But I would like to have it not show an error after running, because then I might miss an actual error if it occurs. Is there a way to do that for one specific tool?

 

Thanks,

Meiye

 

 

3 REPLIES 3
Aryasuta_Panda
7 - Meteor

Hi, you can replace the '0' occurrence by null so that instead of the error you will get null values which will not impact the result I guess. 

 

Thanks.

geraldo
13 - Pulsar

@Aryasuta_Panda 

 

Na fórmula que você está realizando a divisão, faça primeiro um teste:
if [divisor] == 0 then 0 /* or  equal Null()*/
else [dividendo] / [divisor]
endif

 

A mensagem é controlada aqui.

 

rached.JPG

danilang
19 - Altair
19 - Altair

Hi @Meiye 

 

Adding to @geraldo's suggestion, I would recommend using the Null() option as opposed to 0.  A result of 0 naturally occurs if the numerator is 0, so setting the result of a divide by 0 to 0 will give you false positives.  Using null() allows you to differentiate the divide by 0 transactions if required.  It's too bad Alteryx didn't implement the Inf and NaN values found in R.

 

Dan

Labels
Top Solution Authors