Learn more about the Alteryx Maveryx Universe recently announced at Inspire 2023!

Alteryx Designer Desktop Discussions

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

Replacing Null Fields with Imputation

5 - Atom

Hi, I currently have 27 columns of integer data. Within some of these columns I have null values in some cells. I want to replace these null values with "0". I figured I would use the imputation tool to do this. However, I am getting an error "A record was created with no fields". I set the imputation properties to 1) Incoming values to replace: Null() and 2) Replace with value: User specified value 0.000. I get this value regardless of which column I select and which user specified value I set it to. Am I misunderstanding this tool?


The only workaround I've thought of is to create a formula that replaces every column. I have 27 columns though so this could take a while...


Thank you! 

7 - Meteor

@ChrisF - the workflow can't decide which error to throw.... I'm not so sure sending the workflow will help show the error. I also deleted the input node due to secret data. But, any help you can provide would be great. It would be nice to be able to use a node for its intended use instead of a quick formula work around.



Alteryx Alumni (Retired)

@lhornstra So, without the input data, I'm not able to replicate your exact case. However, I built a sample workflow that I think will test the same basic pattern.


  1. Start with a mix of int, double, and string fields
  2. Replace nulls in string fields with multi-field formula
  3. Replace nulls in numeric fields with imputation tool
  4. Feed data into the Boosted Model tool

Does that seem accurate? If so, I'm hoping the up-to-date version of the Imputation macro will work for your case as well since it's at least working in the test workflow I came up with. I've attached the workflow, including the Imputation macro itself. Take a look and let me know if that's a good approximation of your case or if I'm missing a key step in reproducing the error. If nothing else, it might be worth trying your scenario with the Imputation macro from my workflow just to make sure we're using the same versions.


Let me know how it goes!

7 - Meteor

ChrisF, thanks so much for working on this. I downloaded the workflow you sent and changed it back to my input node and got an error that I forgot to mention I had been receiving from Imputation_v2, one that an Alteryx Support person sent me. Now, my output from the imputation macro is simply a string value instead of individual fields that have been imputed. I attached a word doc with images of what is happening.



Alteryx Alumni (Retired)

Hey @lhornstra, can you do me a favor? Can you try taking out the boosted model tool (but leave in the Imputation tool and make sure it's configured how you like), and then run the workflow? If my suspicion is correct, you should then see the correct fields coming out of the imputation tool, and you should also be able to add whatever tool you want after the imputation tool and have the fields show up correctly.


My hunch is that since this Imputation_v2 uses a lot of the "Dyanmic" tools (like dynamic rename, dynamic select), it's not able to pass metadata on to the next tool until it's been run at least once, but then after that it should hold on to the metadata so you can keep adding downstream tools as you like.


If that IS the case, I'm not totally sure what the easy fix is just yet. The Dynamic tools offer a lot of power, but sometimes at the cost of metadata persistence so it can be a hard trade-off to make. That said, if we can at least confirm that running the workflow once will generate the correct output from the Imputation tool, and that you can then build your boosted model correctly, we'll at least have narrowed down the issue quite a bit.