Date de publication : 03 Dec 2020 Date de dernière modification : 18 Oct 2022
Question
How to show data that isn't present in a data set on a map. In the following example, the Countries Belgium and Germany disappear from the view because there is no line with data of these Countries in the data set.
Country
Data
Netherlands
1
France
1
Environnement
Tableau Desktop
Microsoft Excel
Réponse
By design, missing data will disappear from the view. In this example, workaround this design by adding Countries with the value 0 in a new Sheet in Excel, and then joining the data with a master table of Countries. The data and the workbook can be downloaded from this article (in the top right corner).
In this example, ensure your data source contains a sheet all required countries and Zero (0) values assigned to them
For this example, we're adding the data source again a new data source
Join both sheets from the data pane using the Country field
Build the map view, add the Value from Sheet 2 to Color
Drag the Country field from Sheet 1 to Details
To view the above steps in action, see the video below. Note: the video has no sound. To view the video in higher quality, click the YouTube icon below to watch it on YouTube directly.
Informations supplémentaires
The same result can be achieved with only one sheet of the data, which will need to be related it to itself.
Merci de nous avoir donné votre avis sur l’efficacité de l’article.