10 Replies Latest reply on Apr 9, 2017 2:03 PM by Henry Gascon

    Null Values in Geographic Map not Disappearing

    Jackson Consulting

      Hi all,

       

      I have a national map that I'm coloring and sorting by county. There are null values in the map that I'd like to appear grey or black.  Even though Tableau recognizes these values as Null and I've chosen to hide Null values, the color for these Null counties still appear as dark green based on the divergent shading (i.e. 0).  I'd have some kind of sequential shading, but I need the spectrum of the colors between Red and Green.

       

      Does anyone have any idea why these are still included? I can't share the data, but I can share a screenshot (I'm looking at Northumberland, the county right below the checkmark in the Keep Only button):

       

      Colored Null Values.png

       

      Thanks a lot!

      Jackson

        • 1. Re: Null Values in Geographic Map not Disappearing
          Joshua Kennedy

          So your issue is that the Null value County you can see or the color is green and it should be gray?  Tableau's built in mapping resource is still going to have Northumberland County so I don't believe you could hide it completely without changing your Map>Map Options>County Borders.  Null values in regard to color are most likely below 0 on your color scale so they would fall in the Heavy Green area.

           

          Otherwise in regard to your data it would seem that you have data for some elements of that point and not others so Tableau is doing it's best to fit the piece so to speak.  I'm guessing Prevalence by County is a string field?  But is it calculated based on any of the other detail elements (measures)?

           

          You might want to check your data because the dimension "Heat Map Visualization Prevalence" has Diabetes for Northumberland county despite having a NULL - % of Medicare Members with Diabetes.  In this case I would use a parameter to handle the selection of "Heat Map Visualization Prevalence" and tie that parm to a filter/Calculated Field with a logic formula to the extent of something like CASE "Visualization Prevalence Parameter" WHEN 'Diabetes' then {% of Medicare Members with Diabetes} else if [Next Parm Value] >>> [Next Metric] END

          It is hard to tell the best course without more detail but I hope that helps.

          1 of 1 people found this helpful
          • 2. Re: Null Values in Geographic Map not Disappearing
            Jackson Consulting

            Thanks for the response Joshua.  To clarify, I'd like the Null values to just show up as grey on the map, rather than being colored in dark green (0). I'm not looking to actually hide the county, as I'd still like to allow the users to highlight the county and see the underlying data.  The data that I'm hoping to color based on bull values is a number field taken from my underlying data, but there's no additional calculations being performed in Tableau.

             

            Per your suggestion, I'm actually using a parameter to select which data to display (using the radio buttons in the top right). 

             

            I think the biggest issue that I'm struggling with is how do I get Tableau to not recognize Null values as 0 in terms of being colorized.  It correctly recognizes them as Null, shows them as Null, and then still colors them as if they are 0.

            • 3. Re: Null Values in Geographic Map not Disappearing
              Joshua Kennedy

              One though I had about how to cheat the color system is to use a calculation that makes 'NULL' values be a fixed mid point you specify in the edit colors menu.  I'm still not sure that is going to work how you are wanting and to that degree if you are using a parameter like I suggested then you would need to determine the mid point for each scale and write a logic statement that cast each metric something like: CASE "Visualization Prevalence Parameter" WHEN 'Diabetes' then IFNULL(% of Medicare Members with Diabetes, .295 ) ELSEIF ....  That might work but I'm honestly not sure and it is certainly a work around solution.

               

              Hope it helps.

               

              Josh

              • 4. Re: Null Values in Geographic Map not Disappearing
                Kurt Heisler

                I would love to see a solution for this. For both fill maps and heat maps (and possible other views), Tableau treats Nulls as 0s. (For the issue in Heat Map, see Heat map treating NULLs as zeros).

                 

                So if you have a fill map of U.S. data, and data for Florida is missing, ideally you would like Florida to be uncolored (or somehow stand apart from the other states that have actual data). But instead, Tableau treats FL as a 0 and colors it on the same scale as other states with a value of 0. If you filter out Nulls, FL disappears entirely from the map, which is obviously not desired.

                • 5. Re: Null Values in Geographic Map not Disappearing
                  Jason Young

                  Did anyone ever find a solution to this problem? I am facing pretty much the exact same issue on a current Tableau project... I have a map that is colored by a parameter that contains count data over several years, but data is missing for some areas on certain years. I don't want areas that are missing data to be colored as though they had reported a count of zero. Thanks!

                  • 6. Re: Null Values in Geographic Map not Disappearing
                    Matt Lutton

                    Jason:

                     

                    Its very difficult to help without an example workbook -- I might suggest posting a new thread, since this one's a bit old, and post an example TWBX file so more users can see the effect you are describing and attempt a fix on some sample data.  If your data is sensitive, you can use Superstore Sales to mock up a similar example, or take a subset of your own records and blind them in Excel and use that as the basis for your TWBX file.

                     

                    That being said, I believe you can address this with a dual axis map, where one axis colors the NULL values, and the other colors the States.  I'm not sure how your parameter would impact this, but I'm attaching an example where I've successfully colored the NULL states in the map differently from the rest of the color scheme.  This requires some fiddling with color schemes and transparency, but the end result seems to work - I added a label for the NULL states in this example.

                     

                    If this doesn't help, ping me with an @ mention if you post a new workbook in a new thread. Kurt Heisler, I believe this solution would work for what you were describing, but its been a several months so I'm not sure if you found a workaround or not.

                    NULLs.png

                     

                     

                    Cheers

                    1 of 1 people found this helpful
                    • 7. Re: Null Values in Geographic Map not Disappearing
                      kate.meck

                      I had a similar problem and solved it by adding the measure with null values to the Filters card, going to the Special option, and then choosing to display only non-null values.

                       

                      Before, when I tried to view different pages, countries with null values would be shaded as if the value was 1. For example (see below), in the year 2011, there were no citations from USA (note the caption), but it's still shaded as if the value was 1.

                      Before.PNG

                       

                      After filtering citations for non-null values, the US is shaded correctly.

                      After.PNG

                       

                      Thanks to Kris Erickson for inspiring this simple fix in this post found : Re: Forcing a nofill on a filled map

                      1 of 1 people found this helpful
                      • 8. Re: Null Values in Geographic Map not Disappearing
                        Henry Gascon

                        Hi everyone, the tableau Matt shared for this question was most helpful. I'm trying to replicate that effort with a file I am working on and am unable to make it work properly. I have a dual axis map attached where on the left, I have a graduated color scheme of counties and on the right are null values I identified using the ISNULL formula. I'd like to merge the maps where the null values appear in gray and the graduated blue colors on the left map remain. When I attempted the dual axis, the map on the right only appeared. What can I do fix this? I feel I'm missing a simple step but don't know what it is. Thanks! Henry

                        • 9. Re: Null Values in Geographic Map not Disappearing
                          Sarah Battersby

                          Hi Henry Gascon,

                           

                          Is this what you're trying to get - the grey 'Null' counties on top of the blue county map?  If so, try right clicking on the second longitude column and making the dual axis map (you'll see the white/grey map on top of the blue map), and then in the AGG(Null Values) legend, right click on 'False' and select 'Hide'.

                          4-8-2017 7-00-16 AM.png

                           

                          -Sarah

                          Tableau Research

                          2 of 2 people found this helpful
                          • 10. Re: Null Values in Geographic Map not Disappearing
                            Henry Gascon

                            Sarah, thanks so much! That was exactly the solution I was looking for. I greatly appreciate you looking at this and helping me reconcile this annoying problem!

                            Cheers!

                            Henry