Can you make a screenshots where shelves are visible?
Also, for that calculation it is better to use IFNULL()
That error is in the tooltip for invalid column? (in data source table)
So I actually figured out that what happened was that the calculation was invalid in the data set but valid on my sheet because I was using the data blending features in Tableau, which I recently learnt were specific to each sheet.