I wonder if some modification of a set action linked to distance calculations would help with this? I'd probably have to look at your dataset to really wrap my head around the use case / problem, but this is just my first guess... I wrote up a blog post on a simple use of set actions for dynamic distance calculations, so if it helps, here is the link: Set actions for dynamic distance calculations
Thanks for your response, I have created a tiny extract so you can get the picture. In this instance, Kings Cross Station is to be the continuous marker with all the other restaurants to be multi-select filterable and/or set-actioned
288051 - Example dataset.xlsx 11.7 KB
I'm still a touch foggy on the required task, but here is my interpretation of your question... a viz that lets you click (or draw box, etc.) to select establishments, maintain the selection of the station(s) on the map when the selection of establishments is made, allow some sort of display of the distance form selected to the station(s).
I've put together a quick viz using set actions that allows you to select the establishments and add them dynamically to a set. That set is then combined with a set that just contains stations, and all are visualized together so that the selected establishments and station are highlighted. I couldn't figure a good way to remove all of the non-selected establishments and get them back easily (though there may be a way with some creative adjustment of the set action...)
Is this even remotely close to what you're trying to do?
set_action_select.twbx 87.1 KB
1 of 1 people found this helpful
Thank-you for your efforts so far although this is not what I am looking to achieve - I suspect my description to be the cause of this.
What I am wanting to show is a table-linked map of Places of Interest (poi) and, the distance from a static location also marked on the map, so when a user selects the place of interest from the map, the map is filtered to the selected place of interest and crucially, the station marker also remains so the user can determine the location and distance the poi is from the station.
This is a rough-cut of the dashboard, where a user can select the light-bulb to show the restaurant's location on the map:
But, due to Tableau's order of operations, filtering will filter-away the data that holds the marker for the station.
So far, the most likely candidate would be a self-blend [blended against a generic field that appears on the same row, a value of "T" would work], as this would allow for one set to be filtered to the selected poi, whilst keeping the station in the view too however, in the world of mapping, and of Latitude and Longitude, absolutes are necessary as the built-in postcode functions are too wide, so I have had to provide these such, that the lats and longs from the secondary set do not come through and, to make matters more interesting, when plotting on a dual axis-map, the geo-function of the mapping is removed.
The only other method I can think of that may achieve this would be to have a duplicate of every poi, with a sub-name, the first row is the poi details, the second would be the station details, these are linked in the data source under the same name and filtering is achieved as such, using the sub-name for all other functions such as shape, name colours etc.
This method might actually make configuring the paths easier too.
1 of 1 people found this helpful
Yes, my suggested method of my previous post has worked, so whilst this is ok for a simple spreadsheet, the method to employ here for a large set would be a union all statement on the sql.
Now just got to setup the paths to see if this will work as expected
So the method to resolving this comes from having dual locations on the filter point.
As we know, filters are applied at the data source end of the pipe in Tabelau's order of operations and, for the SQL savvy you will know that the where clause which is what the Tableau quickfilter actually is, is applied second, once all the tables have been gathered and joins applied.
So the result is, filtering will therefore remove the rows that contain the additional data we want to keep, from the source, before the data is piped to Tableau for assembly so by using a filter, we have already lost before we have started.
One alternate method that may work for anything but mapping, would be the self-blend, that is, to duplicate the data source and use a pre-calculated blend field something along the lines of:
to setup the relationship so that as other items are filtered away, so long as the relationship is maintained (which it should be as every row of each set will contain the blend field), then this will work, for most but crucially, this method is not available for mapping as all items on a blend are aggregated which includes the Latitudes and Longitudes.
The only real sure-fire way to resolving this will be to create a duplicate entry of every lat/long Place of Interest in your source, then with an adjustment in your source to create a secondary field to hold the real location name, and, updating the second entry's detail to that of the intended secondary location, then filtering on the primary location name, will keep both points in the view:
- My Point of Interest name in my data source is called Establishment I then added a secondary column called Actual_Establishment
- Add the value from the Establishment field to the Actual_Establishment field
- Duplicate every entry:
- This is simple in Excel with only 14 locations although might become cumbersome to maintain a massive list
- In a database, this is even easier to maintain as you could read the primary data into and update to a secondary value from within a derived table before Union All the two tables together
- Update the secondary entries from Actual_Establishment onward so now, we will have two versions of say "The Parcel Yard" but each will have a different set of Lat and Long and a different Actual_Establishment
- Update the map keeping Establishment on the LOD, adding the actual_establishment to the text and shapes fields for formatting
- Add a targetted action to the table that filters the map for the Establishment dimension - and for me, using sheets in tooltips, ensure the tooltip filter also uses the same filtering as the action
So now, I can multi-filter the table to show one or more establishments on the map whilst also keeping the station in view too.
From the attached, hovering over the light-bulb will show a mini-map in the tool-tip but clicking the bulb will filter the main map, and you can select as many bulbs as you like.
Workbook downgraded to 10.5 for older versions although the methods mentioned here are compatible down to v6 (2011)