Skip to main content

I think this must be using a ton of memory, even when filtered down pretty tight MAKELINE is drawing an order of magnitude+ more lines than I need displayed. I was thinking there must be a function to have only unique routes drawn but I haven't been able to figure it out.

 

Method: I am using a MAKELINE calculated field using two MAKEPOINT calculated fields (with lat/long values) to create the routes. I have given routes unique IDs by combining the station IDs (a short alphanumeric string, e.g. "A12345" to "B67890" = "A12345-B67890"). I have separate columns with IDs for the route that are either bi-directional (same ID no matter the order) and single-directional (different ID depending on origin and end point order).

 

Thanks for your help!

 

An example of what I'm talking about: each highlighted line there (46 in total in this filtering) is on the same route. I have color and tooltips to indicate route popularity, I'd love to not have 46 lines drawn for 1 route.

 

I'm using a MAKELINE function in order to draw routes between bikeshare locations in my city. I'm noticing that a line is drawn for every single trip. Is there a way within Tableau to have single lines drawn per route (I have the routes named)?

2 answers
  1. May 5, 2025, 12:25 PM

    @Nat Rosevear​ 

    Hi, as you are having separate lines, it is probably because you have several latitude and longitudes. What about using a FIXED by Route Name to obtain the AVG Latitude and AVG Longitude, so you don't have multiple lats and longs:

     

    {FIXED [Named Route]: AVG([Start Latitude])}
    {FIXED [Named Route]: AVG([End Latitude])}
    {FIXED [Named Route]: AVG([Start Longitude])}
    {FIXED [Named Route]: AVG([End Longitude])}

    Then use the AVG calculated start end latitute longitude in your MAKELINE.

     

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego Martinez

    Tableau Visionary and Forums Ambassador

0/9000