Skip to main content

Morning all,

 

My company is holding a contest.  When we started the contest we expected to get entrants from the US only, so our dataset only has columns for the City and State.

 

We have entries from:

EnglandReadingGermanyAnsbachGermanyUffenheim

 

What I want to do is to create map by and color each state within the US and color the entire countries of England and Germany.  Can that be done?

 

I have tried entering a lat/long but all I get is just a dot on the country of England or Germany.

 

Thanks,

 

Scott

10 respuestas
  1. 5 may 2020, 00:28

    Interesting stuff going on here...

     

    In the attached I made the calc I suggested, and I have it on the COLOR shelf.  If I do not add Country to the detail shelf, the colors are blank.  When I add country (on sheet 2) we get colors by country.

     

    When I add State to the shelf (sheet 2(2) ), I get colors for the states in the USA.  And I get blue for England.  The state value for Great Britain is England.  Apparently Tableau's geocoding recognizes GB/England. (The rest of Great Britain goes blank however.  Just England gets colored.

     

    Germany is red on the first map when it's colored at the Country level.  But there is no country/state called Germany/Germany, so Tableau loses its ability to color anything.

     

    So I came up with a bit of a hack.

     

    On sheet 2(3) I made a dual axis map.  I put lat and long on the sheet twice and did dual axis on each.  Now I get all the marks twice.  On the first one I just set the colors by country.  (I selected a color for USA that approximates the map background color.  At first I colored USA white. That sort of works.  But the grey is closer to what you want (I think) where there are missing states.)  The second mark is colored by states.  These get laid on top of the first marks.  So the state colors show up where you want them.  With nothing in Germany, the country coloring prevails.

     

    See attached.
0/9000