What is a "null" and when is it bad?
Nulls are different from fields that have spaces or that have a zero ("0"). When a data field is completely empty, we call that a "null value." Because that field value is unknown, Juicebox doesn't assume it should be auto-populated with other text and leaves it empty. This article covers how to fill in when dimension values are null. (For how to deal with null metric values, see this article TBD).
Consider this data where the name of the team member in row 5 is missing from the data.
In Juicebox, this field will show up something like this:
Many times you'll want to leave these just as they are. But other times, you'll want to fix it -- I presume that's why you're reading this article π.
How to replace nulls in your data
For those times where you've decided that nulls need to have a have no place in your Juicebox data story, you'll want to use Conditional Logic to clean that up.
Start by creating an Advanced Column based on the dimension ingredient that has the null values in it. Now, in the Format field, find the line that starts with "field:" and replace it with something like this:
field: 'if(Team_Member IS NULL, "Unknown Member Name", Team_Member)'
where "Team_Member" is the field name of the field with the nulls in it.
Now, use the new advanced column in your Juicebox charts and everywhere there was a null, "Unknown Member Name" will show up like this:
Yup. Buh-bye, nulls.