I'm trying to show any branches within [Radius parameter] of an airport whenever I filter for that airport, but when I filter for an airport name it only shows me the branches that are within the state and not any that are within the buffer but out-of-state.
The reason I joined the tables this way is because Airports and Branches just have latitude and longitude columns without a Geometry field, and when I tried to create a Buffer Intersects join on makepoint, it would take a long time to load as the buffer radius would need 100 miles at least in order to not exclude any of the data points: ex. using a radius of 50 mi reduced the summary card's count from 5196 to 5129 (yes, there are a lot of airports in Alaska that aren't close to anything, but still).
I've tried creating a filter calculated field as per Yuri Fal's suggestion in this thread https://community.tableau.com/s/feed/0D58b0000C8PBWDCQ4?t=1709757605410 along the lines of
INTERSECTS(
BUFFER( MAKEPOINT( [lat1], [lon1] ), param1, 'mi' ),
BUFFER( MAKEPOINT( [lat2], [lon2] ), param2, 'mi' )
)
but this is a boolean and I'm not sure how to have it take into account which airport I'm filtering for.
Hi @Emma Fan
The problem is in your data source - you've joined airports to branches using the state code, so every airport is connected only to branches in the same state.
You should be using relationships instead. Create a full cross join relationship between the airport and branch tables (using a 1=1 relationship), and then you can use any logic to relate them to each other.
If you attach the source tables in Excel or csv for airports and branches (leave out any sensitive columns, but retain the coordinates), I can show you how it's done.
Dan Chissick
Senior BI Consultant | Tableau Forums Ambassador