2 Replies Latest reply on Jan 2, 2015 2:46 PM by Jonathan Drummey

    How to remove only null values in 1 dimension on a 2 dimensional bar graph

    Peter Lugten

      I have a bar graph showing pass rates for 9 areas (measure names) which is broken down to show YOY for each (first few are years and the last 4 are quarters). I would like to NOT show any of the area's that do no have a value to display so there are no "breaks" in the bar chart.

       

      For Example, P2P is data that only take place once a year in the 3rd quarter. So it will show up in every Full Year (12 - FY, 13 - FY) as it is a sum of all 4 quarters. However for 2014 I have quarterly information (as apposed to yearly). So no P2P data exist in Q1, Q2, or Q4. How can I hide just those quarters (Q1, Q2, Q4) but still show the bars for (12 - FY, 13 - FY, 14 - Q3). But keep in mind, I want to do this for all 9.

        • 1. Re: How to remove only null values in 1 dimension on a 2 dimensional bar graph
          KK Molugu

          Peter:

           

          Don't know if this is quite possible (IMHO) in Tableau to hide one dimension on a 2 dimensional graph. Dimensions are used to represent the data so you can compare them across different dimensions.

           

          Pininging Jonathan Drummey to see if he can find a way to leverage table calculations to hide the 'empty value' bars.

           

          ..kk

          • 2. Re: How to remove only null values in 1 dimension on a 2 dimensional bar graph
            Jonathan Drummey

            The issue here is that some measures have data for some periods but not others, so the ideal would be to do something that looks at the combination of the measure & Time. The difficulty with solving that is that although we can use Measure Names like a dimension, it's not a real dimension and we can't access that or the Measure Values in calculated fields (whether record-level, regular aggregate or table calculation). For example, if Measure Names was a real dimension and Measure Values a real value we could write something like:

             

            IF NOT ISNULL([Measure Value]) THEN 1 ELSE 0 END

             

            Make that a continuous value, and then in the view you posted drop that on the Filters Shelf and filter for 1. (This is a workaround for the inability to filter on regular aggregate measures, see http://community.tableau.com/ideas/2190 for more details).

             

            Therefore my suggestion is to unpivot your data to make it "tall" and with that make a Measure Names dimension and a Value measure. This will be a feature of 9.0 (it was demo'ed at the Tableau Conference in September), until then we can do that dynamically via a series of UNION queries or a cross product query. See The Cross Join Collection for some examples of doing cross products.

             

            Jonathan