3 Replies Latest reply on Aug 3, 2017 10:18 AM by Matt Lutton

    Dual axis bar chart: filter doesn't works

    Jefferson Pinheiro

      Hi all. I made a vis about snakes that includes several charts, and when you click on any of a chart's fields, all other charts are filtered to your selection. You can try it here.


      Now, two of the charts (Feeds On and Habitat) are stacked bar charts, and I made them both dual axis, to show the totals above the bars.


      Now let's suppose, on the chart Feeds On, you click the red bar on Amphibians. It will filter (on all charts) only snakes that feed on apmhibians and swallow them alive (the red bar). Perfect.


      Now I want that, when you click the number above Amphibians, to filter all snakes that eat amphibians, regardless of the subjugation type (the colors in the stacked bar).


      Currently, if you click the number, a selection is made, but nothing else happens (nothing gets filtered). Let me show you. Before clicking anything, we have this:



      After you click the "46" above "Amphibians", on "Feeds On":




      A selection was made, but it didn't filter only amphibians, as expected. Nothing happens.


      If instead I click on a colored bar inside Amphibians, the filter works normally:




      How can this be solved?


      Workbook anexed (Tableau 10.3)



        • 1. Re: Dual axis bar chart: filter doesn't works
          Matt Lutton

          I don't know that you'll find a way with your current data structure, as you're really wanting to pass a "Measure Name" from one sheet to another, and we cannot use Measure Names in an Action.


          You could build the label for the total on a single axis, using a reference line set to "Total", and "Per Cell" as the scope, but that won't allow you to select the number to filter the measure names either.


          One extreme possibility that would work would be to re-structure the dataset so all Measure Names are in one column and the Measure Values are in a separate column -- then, you'd have Rows in your data that could be Filtered on "Measure Names".  I'm not sure if that makes sense without an example, and again, its a bit extreme just to get the ability to click on the label in this chart.


          I hope this helps a bit!

          1 of 1 people found this helpful
          • 2. Re: Dual axis bar chart: filter doesn't works
            Matt Lutton

            Currently, you are passing the Subjugation Type as the dimension. It would have to be included on the axis you're using for the label to be passed to the second sheet, and obviously, that will impact your label (which is why I am thinking you may not have an easy way to do what you're after with the current setup using the generated Measure Names/Values fields Tableau creates)

            1 of 1 people found this helpful
            • 3. Re: Dual axis bar chart: filter doesn't works
              Matt Lutton

              Here is the view with a total reference line in place of the second axis, but again, you still cannot select the value to filter by Subjugation Type or Measure Name:

              Total Line.png

              Fewer marks in this version, so that could be a potential performance benefit.

              1 of 1 people found this helpful