2 Replies Latest reply on May 20, 2016 5:58 AM by Adrian Rettner

    Creating a custom map chart with secondary data

    Adrian Rettner

      Hello Community,


      we are testing Tableau right now and want to create a Dashboard with a custom map (of our plant grounds).


      We have our (primary) data in a MS-SQL-Server and an excel-file containing the coordinates of the objects as a secondary data source. We linked these two sources together via Data -> Edit relationships.


      The relationship works just fine, we can now show the coordinates of our objects along with the corresponding measures.


      But we cannot show the background image, since it is mapped to the data of the excel file (secondary data). In the menu containing all background images it says it was not valid.


      Does somebody have an idea how to fix this?


      Thank you very much in advance!





        • 1. Re: Creating a custom map chart with secondary data
          Tharashasank Davuluru


          Adding Background Images

          When you add a background image to the view, you need to specify a coordinate system by mapping both the x and y axes to the values of fields in your database. If you are adding a map, the x and y axes should be longitude and latitude expressed as a decimal. However, you can map the axes to any relevant fields based on your own coordinate system.

          To add a background image:

          1. Select Map > Background Images and then select a data source.
          2. In the Background Images dialog box, click Add Image.
          3. In the Add Background Image dialog box do the following:
            • Type a name for the image into the Name text box.
            • Click Browse to navigate to and select the image you want to add to the background. You can also type a URL to link to an image hosted online.
            • Select the field to map to the x-axis of the image and specify the left and right values. When adding a map, the longitude values should be mapped to the x-axis using decimal values (instead of degrees/minutes/seconds or N/S/E/W).
            • Select the field to map to the y-axis of the image and specify the top and bottom values. When adding a map, the latitude values should be mapped to the y-axis using decimal values (instead of degrees/minutes/seconds or N/S/E/W).
            • You can adjust the intensity of the image using the Washout slider. The farther the slider moves to the right, the more faded the image will appear behind your data.
          4. You can specify the following options using the Options tab:
            • Lock Aspect Ratio - select this option to maintain the original dimensions of the image for any manipulations of the axes. Deselecting this option allows the image’s shape to be distorted.
            • Always Show Entire Image - select this option to avoid cropping the image when the data encompasses only a portion of the image. If you lock both the axis in a view, this option may be negated.
            • Add conditions for when to show the image. Refer to Adding Conditions to Filters to learn more about defining conditions.
          5. Click OK.

          When you add the x and y fields to the Rows and Columns shelf in the view, the background image displays behind the data. If the background image does not display, make sure that you are using the disaggregated measures for the x and y fields. To disaggregate all measures, select Analysis >Aggregate Measures. To change each measure individually, right-click the field on the shelf and select Dimension. Finally, if you’ve used the generated Latitude and Longitude fields for the x and y fields, you’ll need to disable the built in maps before your background image will display. SelectMap > Background Maps > None to disable the built-in maps.

          In order to make the marks in a view more visible when placed on top of a background image, each mark is surrounded by a solid contrasting color called a halo. You can turn mark halos off by selecting Format > Show Mark Halos.

          • 2. Re: Creating a custom map chart with secondary data
            Adrian Rettner

            Hi Tharashasank,


            thank you for your reply! Unfortunately that did not solve our problem, since we already mapped the Background Image successfully - but to the data of our secondary data source, not our primary source.


            Since the viz is based on the Primary source, we can not use the Background Image so far.


            But we managed to solve the Problem differently: We simply added the data of the seconday data base (the Excel file) to the SQL-Server (our Primary source).


            Now it is working - and we try to avoid secondary data sources whenever we can...