1 Reply Latest reply on Oct 19, 2018 9:02 AM by Joe Oppelt

    Dynamic Stacked Bar Chart with Filter

    a.a.202

      Hi,

       

      All I am trying to build a dynamic stacked bar chart that shows market share over time.  However, I want to be able to easily toggle between different geographies.  At present, I can get the dynamic stacked bar chart to show me the top N and put everything else into the other bucket when all geographies are selected.  However, it fails to properly do so when the geographies are limited.  I have attached the sample workbook.

       

      Thanks in advance.

        • 1. Re: Dynamic Stacked Bar Chart with Filter
          Joe Oppelt

          Use a table calc for a filter on Country instead of a quick filter.


          Quick filters delete rows from the underlying table.  Table calc filters leave the table intact (so that other table calcs can still have access to non-displayed marks) and just displays what satisfies the table calc.

           

          In the attached I used LOOKUP to make a table calc filter.  THis structure results in a filter that looks and feels just like a quick filter.  The second argument of 0 tells tableau to look at all rows, row-by-row, and get for that row what satisfies the selected value.

           

          Notice that I had to add [Country] to the sheet on DETAILS so that tableau "sees" the data at the country level.  Also note that I set the table calc setting for the filter to "cell".  Different settings do different things.  This one seems to give me the best behavior.