4 Replies Latest reply on Oct 7, 2014 1:02 PM by Joe Oppelt

    Filtering Challenge

    Drew Hull

      In the attached workbook I have a map filtered to show only those States where Furniture Sales are greater than $100k, by filtering on Furniture Department and a Condition Filter on State where sales are greater than $100k. 

      Now I want to be able to show sales for ALL Departments for each state in the same map, presumably in the tooltip, but I am open to other solutions as well. 

       

      Thanks for your help!

        • 1. Re: Filtering Challenge
          Joe Oppelt

          You weren't really selecting for states with Furniture>=100000.

           

          Take a look at the CONDITION tab for the filter for STATE that I have in the attached.  This gets all records for any state where total furniture exceeds 100000.  (You could have a user-defined parameter and compare against that too instead of 100000.)

           

          With all those records selected, create separate calc fields.  I did two:  TOT FURNITURE and TOT TECHNOLOGY.  you can do it for the third.

           

          The calc does this:  For each selected record, either set itself to SALES or to zero.

           

          (Pull up DISPLAY DATA and see what gets set in there.)

           

          Now you just have to let Tableau SUM(calc), and that automatically happens when you drag it onto the TOOLTIPS shelf.  Make sure it gets displayed in tooltips.  (You may have to INSERT it in the tooltips editor.)

          • 2. Re: Filtering Challenge
            Drew Hull

            Thanks.  It looks like this will work.  I will translate it into my actual data and use case and let you know if still struggling.

            • 3. Re: Filtering Challenge
              Drew Hull

              I see how this is working for you, but I am getting an error in the calculated field saying I cannot mix aggregated and non aggregated fields. 

              Any thoughts?

              • 4. Re: Filtering Challenge
                Joe Oppelt

                Post a sample workbook with your calc field.

                 

                Usually if you have a SUM(whatever) and a [variable] you get this error.  To get around it, do:

                 

                ... Sum(whatever) + ATTR([variable]) ...