Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to skip the process if value is null

Sshasnk
8 - Asteroid

Hey, I have to do a calculation from a value, lets take an example:

 

value
2

 

Now I have to find the square of the number so the output will be:

valuesquare
24

 

Now my problem is if the value is null I don't want the value to go formula tool (currently my canvas is throwing an error because the value column is empty).

 

value
 

 

Now it should not generate any output

 

Let me know if you have any questions.

 

Thanks,

Peace

 

5 REPLIES 5
PhilipMannering
16 - Nebula
16 - Nebula

So you could filter out the Nulls?

Sshasnk
8 - Asteroid

@PhilipMannering I tried it but it is throwing an error in formula tool because it is not getting any value

Maskell_Rascal
13 - Pulsar

Hey @Sshasnk 

 

You could write an IF statement to prevent Nulls from being calculated. 

 

 

IF IsNull([Value]) THEN Null() ELSE [Value]*[Value] ENDIF

 

 

Maskell_Rascal_0-1605711025462.png

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Thanks!

Phil

 

Sshasnk
8 - Asteroid

@Maskell_Rascal  What if all the value is null in value column? that was my question

thanks

PhilipMannering
16 - Nebula
16 - Nebula

If all your values are Null then you would end up with a new column that was all null. 

 

If that's an issue your course of action could be to throw an error or remove the column. Both scenarios are  in the attached workflow. See if it solves your problem...

 

 

Labels