2 Replies Latest reply on Jul 12, 2017 11:39 AM by Michael Gillespie

    Filtering excludes geographic data points

    morgan pocock

      I am trying to plot out sales for 5 different product lines by zip code. There are many instances where for a given zip, one of the products was sold, but the sales for the rest of the products is 0. I only want a circle to be mapped for sales that don't equal 0. If there is any activity in a zip code, however, Tableau plots a point for each of the 5 products even if some of them didn't have any sales.

       

      I have tried creating boolean calculated fields such as "SUM(Encore $)!=0" and other variations of this for each product line but it doesn't work. Tableau seems to plot all or nothing- 5 circles for each zip code with any sale and nothing for zip codes without sales.

       

      Is there any way to limit the number of circles on each zip code so that only those with sales are displayed?

      Thanks!

        • 1. Re: Filtering excludes geographic data points
          John Sobczak

          One way is you can put each of those aggregated measures (ie sum([measure1]) on the filter shelf, convert it to discrete (ie. blue) and uncheck zero.   This will still allow any negative values which can occur in many types of data.

          • 2. Re: Filtering excludes geographic data points
            Michael Gillespie

            Some sample data would be helpful, but in general terms, you need a filter that prevents any item with no sales from showing up on the viz.  So how do you tell from the data set that there are no sales for an item?  Do you have a row with "0" for quantity?  Or do you just not have a row at all?

             

            I'd need to play with your viz to see exactly what's happening, but it looks like you're telling Tableau to put a dot on every zip code and size the dot based on the SUM of $ for each product line, right?  That tells me that you have individual COLUMNS for each of those product lines, rather than rows.

             

            Have you tried pivoting your source data in the Data Source tab to turn it into rows?  I think that will make it easier to get to your desired result.

             

            What you're looking for is ONE column called Product Line and another column called Sales $.  You'll have multiple rows for each ZIP code and likely NO rows if there are no sales for that product line in that ZIP code.