the issue you are having is with the distance formula the formula needs to be based on a single select point (your zip or pid) and each the other points on your charts -
Sarah Battersby did a great presentation on exactly this problem at TC18 see the video link
she will walk you through the calculations
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.