Create a table with distance (matrix)

I will post any idea on this direction. Thanks @Gregws!