Hi all
I have the following data set (Note, the original data set has over 1mil rows)
A | B | C | D | E | F | G |
[Null] | 1 | [Null] | [Null] | [Null] | 4 | 65 |
[Null] | 2 | [Null] | [Null] | [Null] | 7 | 87 |
[Null] | 3 | [Null] | [Null] | [Null] | 8 | 9 |
I essentially want to update the [NULL] fields to 'N/A' in one go. I can update it using a formula tool but that takes some time as the main data set has 10+ columns which contain [NULLS] which I need to update.
Final output to look like
A | B | C | D | E | F | G |
N/A | 1 | N/A | N/A] | N/A | 4 | 65 |
N/A | 2 | N/A | N/A | N/A | 7 | 87 |
N/A | 3 | N/A | N/A | N/A | 8 | 9 |
Many thanks
Solved! Go to Solution.
Hi @h12
You can formula's on multiple fields using Multi-field formula tool.
https://community.alteryx.com/t5/Interactive-Lessons/Multi-Field-Formulas/ta-p/424422
Hope this helps : )
Hi @h12 ,
You can do so using a Multi-Field formula. Pay attention about the fields type, in my solution it uses string fields but if you need to replace null values in numeric fields you'll have to change it a bit.
Attached is an example.
Hi @h12
Here is how you can do it. Refer the highlighted options.
Workflow:
IsEmpty() checks for blanks and nulls. If your usecase is specific to Null you can change to IsNull()
Hope this helps : )
Hi @atcodedog05 Thank you!
What if my data set is like this..
Type | B | C |
Blue | NULL | NULL |
Red | NULL | NULL |
Yellow | 3 | NULL |
Red | NULL | NULL |
Blue | NULL | NULL |
Where I only want to update the fields if the type is red or blue?
Thank you @atcodedog05 ! Sorry, one more thing, can I choose the columns I want to update? In your screenshot youve updated all columns, but lets say I only want to update the NULLS in D and E..
Instead of current field would I select the actual column(s)?
In the tool, you can check the columns you want, either all or only some of them :
Here I just check C column.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |