okay, this was a fun one. No problems that I can see and so I suspect that there are some hidden rounding going on in Tableau. Because these points are zero distance away then within your Distance calc the ACOS calc should be acting on 1 (resulting in a zero). Instead I think there are some rounding issues somewhere in the Tableau background that results in it being
This is not possible so it results in a NULL. I fixed it in your workbook by adding a ROUND( ,10) just inside the ACOS formula to round off the result to 1, and that worked.
Make sense? You might want to raise with Tableau Support as it looks like a small rounding bug IMO.
..well that was fun. I've spent way too many hours on this dashboard working through the issues to make it work as I needed it to & that was the last thing that had me pulling what hair I have left out. Nice fix..I wasn't close to that one yet. It struck me as odd it would calc other zero values (origin distance to itself), but fail on some.
For taking the time to look at it. It seems to be working..I assume this is the fix as you intended:
You got it! No problem, always happy to help out with fun problems like that, keeps the brain ticking :-)
I submitted a ticket and referenced this thread.