1 of 1 people found this helpful
OK, so I've solved it! For some reason, if I create the Comments2 caluclated field within the D2 datasource, I get the above behaviour. But if I create the same calculated field but within the D1 datasource instead, then all the nulls get replaced. Could someone please explain why this is the case?
Think of blending as a left join, where your secondary table left joins on your primary table. The ifnull() logic then cannot differentiate between nulls that are due to your logic, are nulls that occur because there were no matches, so it returns all nulls. Applying ifnull() to the primary source, as you did, will function appropriately as the primary table logics' need not deal with that aforementioned ambiguity.
Hope that makes sense.
Just change the blanks in the master data. I never let Tableau do this. All blanks = #N/A in excel file using conditional formatting in under 10 seconds.