1 Reply Latest reply on Mar 27, 2017 5:44 AM by lenaic.ridinger

    Box Plots - How to filter and exclude certain boxes when clicking a data point?

    callum dunne

      Dear Community,

       

      I have been tearing my hair out looking for a solution to this. As someone relatively new to Tableau I hope you can explain this in simple terms.

      The situation is this:

       

      I have a dataset (Excel) which contains data about students who have taken exams in various subjects. The dimensions of interest are:

      * Student Name

      * Subject

      * Result %

       

      I was asked to create box plots, so have easily created some nice looking ones, where each box represents a subject, and each dot is a Result % for an individual student within the subject represented by the box.

      I have been asked for the following functionality:

       

      When a result point is clicked, the view should dynamically change such that, only subjects where that student features as a data point are filtered in, and all remaining subjects are filtered out. The catch is - in the final view, all students taking the revised set of subjects should be present (otherwise we only get a bunch of single-valued box plots for that one student that was clicked).

       

      Example: Suppose I take exams in Math, Science and French. The user clicks on my Math point, and the view changes so that only box plots for the subjects that I take, i.e. Math, Science and French appear - but with ALL students taking those subjects (not just me).

       

      I have tried parameters, calculated fields and action filters. Nothing works, and it's getting rather depressing. IF ONLY there was a way in which we could capture the subjects taken by the selected student in a variable (i.e. temp table), and then pass that as a filter on the global subject set.

       

       

      Thank you in advance.

        • 1. Re: Box Plots - How to filter and exclude certain boxes when clicking a data point?

          Hey callum dunne,

           

          The general way to do this is to set up a table calculation that will flag the desired marks, and put that calculation on the Filter Shelf. Filters based on table calculations are performed after most all other calculations are completed, so they effectively hide results without changing them.

           

          One caveat is with regards to Tableau's built-in reference line calcs. Those built-in computations are performed after table calc filters are applied (see this post for details: http://community.tableau.com/thread/113542#comment-39603), so that would exclude the "hidden" values from being used in the reference lines. The workaround is to build your own calculations that duplicate what you want Tableau to do, put those calcs on the Level of Detail shelf, and use those for the reference lines instead.

           

          Hope this help!

           

          ----------

          Lénaïc RIÉDINGER, Global Community Engineer Tableau

          Tableau Community Forums | Knowledge Base

          If you see an Helpful or Correct response, please mark it thanks to the buttons below the targeted post!