You cannot 'assign' values to a dimension or a measure. You can create a calculated field to calculate an outcome though.
Here's an example of a calculated field which should do what you're after;
if lookup(attr([Row A]),-1) = attr([Row A]) then sum(0) else attr([Row A]) end
With this formula it shows "Undefined" in all cells I can mention that both fields are set as Number(whole) type.
You will need to upload a Tableau Packaged Workbook which includes sample data so I can replicate.