Are you able to attach not-working-extract data as twbx file format?
I will try... There is a lot of data to clean up and anonymize.
What is the data type of the ID field resolving to in the extract? It might be that either Tableau is converting to a continuous number in which case this could create nulls or, it may be that the two values in your case statement are not in the extract.
Have you tried dragging the ID and [Document Placeholder Test] fields onto an empty sheet to see what values are available.