Alteryx designer Discussions

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

imputation tool version 2 can't recognize NULL values

Highlighted
Atom

I am using the following Alteryx:

 

2019-01-01 00_01_00-About Alteryx Designer x64.png

 

When I tried to replace NULL values in one of the fields using imputation tool, Alteryx deleted all the values (Null or non-Null) in that field:

 

2018-12-31 23_55_27-Alteryx Designer x64 - TestWorkflow.yxmd.png

 

Here is my setting:

 

2018-12-31 23_59_54-Alteryx Designer x64 - TestWorkflow.yxmd.png

 

But once I switched the imputation tool to version 1, system could handle all the NULL values correctly:

2019-01-01 00_09_10-2019-01-01 00_07_37-Alteryx Designer x64 - TestWorkflow.yxmd_.png

 

Is this an application bug or my setting issue?

 

I also attached the workflow package for reference.

Highlighted

Try using a formula tool and implementing "if (([Age-years]==Null()) or (IsEmpty([Age-years])) then Null() else [Age-years] endif" into your [Age-years] field. This should make sure that there is only either a number or Null() values. If there is possibly a blank row in that field then the formula should turn it into a null() for you. Hopefully that works!

Highlighted
Atom

Thanks for the workaround. I used your formula as the pre-processing step before Imputation tool. But it still turned all the values into NULL.

 

As a support engineer, I still want to know why version 2 and version 1 have the different output.

I think a work around to approach this problem is to use a formula tool and set null() values to 0. Then create an record id. After the record id use a summarize tool  and use medianNo0 to get the median excluding 0. Append the new age median field.Median Prob.png

I attached the solution workflow below. cheers!

Labels