Alteryx Designer Desktop Discussions

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

Creating a check column to subtract values to see if they are 0

wonka1234
Bola de fogo

Hi,

 

I want to create a column to check if the "Value" columns are the same. I cannot just subtract them as I have nulls in some columns.

 

How can I do th is?

 

 

wonka1234_1-1657723162286.png

 

 

4 RESPOSTAS 4
PhilipMannering
16 - Nebula
16 - Nebula

What abouit replacing Nulls with zeros? You can do this with the Imputation Tool or Multi-Field Tool with expression,

 

 

if isnull([_CurrentField_]) then 0 else [_CurrentField_] endif

 

 

You probably don't want to subtract the numbers and check the result is equal to zero, as floating point arithmetic may leave some remainder, even if the numbers are essentially the same. You're better off using,

 

compareepsilon([Field1], [Field2], 0.01)

 

Where, in this case, 0.01 is the tolerance. If [Field1] and [Field2] are within this tolerance you will get True, else False.

 

lulu47408
Meteoro

If you want to subtract them, you can use a Data Cleansing tool to replace null with 0

wonka1234
Bola de fogo

is there a way to 4 way compare? Ive converted nulls to 0.

PhilipMannering
16 - Nebula
16 - Nebula

I don't think so. You're looking at something like,

 

([Field1] = [Field2]) and
([Field2] = [Field3]) and
([Field3] = [Field4])

...or the equivalent using the CompareEpsilon() function

 

Enquetes
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!
Rótulos