How to Keep Geographic Roles While Replacing Data Source

Published: 02 Nov 2022
Last Modified Date: 02 Nov 2022


How to keep the ​geographic roles (e.g. latitude and longitude) when replacing the existing data source?

For example, there is a data source like the below image.
When Tableau Desktop reads this data, the fields are recognized as String and Number, which is by design.
User-added image
User-added image

If you set the geographic roles in [table A] and try to replace the data source with [table B] which has not set the geographic roles.
User-added image

The expected behavior is that the geographic roles remain in [table B] since the two data sources have the same structure.
However, the geographic roles in [table A] disappear after replacing the data source.
User-added image


  • Tableau Desktop
  • Geographic role


Instead of using the [Data > Replace Data Source] function to replace data, follow the steps below to keep the geographic roles.

The steps are as follows:
1. Move to the [Data Source] tab.
2. Right click the data source and click [Open].
User-added image

3. Add the [table B] from the left side of the [Data Source] tab.
User-added image

4. Drag [table B] to the canvas and drag it onto the [table A.csv] to replace the data.
User-added image

5. The data has been replaced and the geographic roles remain.
User-added image
Did this article resolve the issue?