3 Replies Latest reply on May 30, 2012 1:08 PM by Jonathan Drummey

    Filtering or Highlighting Using Histogram Bins

    Graham Bortz

      Hi All


      I have a single set of data , each item having 2 dimensions (X and Y )


      I have two different sheets , a sheet with a histogram of X , and a sheet with a histogram of the Y Value.


      I want to filter the 2nd histogram , based a a bin selection of the first histogram either at sheet level , but eventually at Dashboard level.


      I can  1/2 achieve this only by making the level of detail at the item level, that means I can only filter at the item level and not the bin level. What I really want to do is make the level of detail of the first sheet ( X) , the bin , and the level of detail of the second sheet , the item , so when I sellect a bin at the first sheet , it shows me where all the items are in the second sheet ie using Tableau to animate conditional distributions.


      I have attached a workbook , with the sheets and the dashboard.


      If you click on the left histogram it will show you the corresponding item in the right histogram, , if you try and select the whole bar say the middle bar , by dragging a rectangle over it , it shows a selection of 41 items in the right , where there are only 4 items in that bar , it will only work if I choose the whole bar item for item  ( X) , but this is not realistic, if pou have 10 K items.  See image attached


      Therefore :


      1) Is what I am doing possible ?

      2) If so how? ie have I done the Highlight action correctly , and are my levels of detail in each sheet appropriate , I should have the level of detail in the first sheet at the bin category , and the second sheet should be at the Y measure

      3) If not , how can I do this differently for the same effect ... I can probably do it by quick filtering , but its not as visually appealing


      I have attched an image where you see the selection on the left ( 4 items )  highlights 42 items on the right , while there are only 4 items on the left ( see count on the left graph y Axis.




      Any Takers for this one !!!


      A solution will bed much appreciated.


      The Tableau Apprentice

        • 1. Re: Filtering or Highlighting Using Histogram Bins
          Jonathan Drummey

          Hello Graham,


          Based on my understanding, you were very close to your solution. There were two changes to be made:


          1. You had imported the worksheet as two separate data sources.  However that's not necessary for the view you want to create and confuses things because to get the blend to work you need the Subs on the Level of Detail. So I replaced the Universe_1 data source with Universe, and that brought the Y (bin) field into the Universe data source.


          2. Since you wan to view the Y (bin) view based on the X (bin), that needs to be in the Level of Detail in the Y (bin) view. Then you can create a Highlight Action Filter on X (bin) that applies to both sheets.


          I set this up in the attached, with two new worksheets X Bin and Y Bin, and a dashboard Working (at bin level) that has the Highlight Action Filter.


          Let me know if this works for you!



          1 of 1 people found this helpful
          • 2. Re: Filtering or Highlighting Using Histogram Bins
            Graham Bortz



            Thank you so much , however I did have the sheets reading from the same worksheet ie my two sheets , however I had the Ideal sheet at subs level and the Universe sheet at Y bin level because It was the only way I got any highlight action. I thought that because I was selecting a bin on ther first sheet I should have it at bin level. What I realized you had is the first sheet , nothing was in the level of detail , and in the second sheet your level of detail was at the X bin level . I changed mine to be at your levels and it worked in both muy sheets and it worked. This is a relief and allows me to use this most powerfully , but I would appreciate it if you would explain why . I sort of realize why you want the second sheet to show at the X bin level , because I am choosing X bin level and want the resolution at the X bin level . I also went back and put the level of detail in the first sheet at X bin and in the second sheet at X bin and it works.  It seems that histograms by default have a level of detail at bin level unless you change it as you do in the Y bin table.


            Once again , thanks for your efforts , I was losing hope ... it took me hours going through all the itertaions


            Regards Graham

            • 3. Re: Filtering or Highlighting Using Histogram Bins
              Jonathan Drummey

              Hi Graham,


              You pretty much came up with the answer yourself...here's the way I think of it:


              The Rows, Columns, Text, Color, Size, Angle, Polygon, and Level of Detail shelves (but not the Filters Shelf)  all contribute their member dimension(s) to the view. The combination of all of those is what determines the number of marks that you see in the lower left corner of the Tableau display. With a histogram, the bin is the dimension used and as you guessed that is setting the "level of detail".


              One confusing thing is that sometimes we can talk about the "level of detail" in the view meaning the combination of all the shelves, including the Level of Detail Shelf. What's good to know is that anything on any of the above shelves is effectively in the level of detail in the view.


              The Level of Detail shelf is special in that it doesn't make more of anything (more colors, more sizes, more columns, etc.) except more marks, but only when the dimension(s) on the Level of Detail shelf would increase the number of marks. The Level of Detail shelf also makes a handy place to put things when you want more detail but don't want it to generate more columns, rows, colors, etc.


              So strictly speaking, it is not necessary to have X bin in the Level of Detail in your X bin sheet, because the X bin is already a dimension in the view on the Columns shelf. And, as you surmised, in order to get the Y bin sheet to highlight at the level of detail of X bin, X bin does need to be in the Y bin view somewhere and since we don't want more columns, rows, etc. then putting it in Level of Detail makes sense.


              The reason why you had to have the subs level to get the highlight at first was because you had defined two data sources, both pointing at the same worksheet, with the X bin sheet defined to point to one data source and the Y bin sheet pointing to the other. In order for Tableau to blend the data and make the highlight work, it needed the subs level in the primary (X data source) to generate the Y, so you had put that on the Level of Detail shelf. The edited file I made just used one data source for both sheets, so subs was no longer needed in the Level of Detail since we weren't using a blend anymore.


              Hope this helps!