1 Reply Latest reply on Sep 16, 2016 3:01 PM by Khang Pho

    Filtering a dimension more than once for a dual axis

    Kaushik Shankar

      I am trying to create a graph with two lines, with two filters from the same dimension.

      I have a dimension which has 20+ values. I'd like one line to show data based on just one of the selected values and the other line to show a line excluding that same value.

      I've tried the following:

      -Creating a duplicate/copy dimension and filtering the original one with the first, and the copy with the 2nd. When I do this, the graphic disappears.

      -Creating a calculated field (or parameter) that tries to split the measures up. This just showed two lines with the same data (which I know is incorrect).

      It should be noted, the dual axis shows up until the point I filter out the other values.

      I want this on the same axis; the best I've been able to do is create two sheets, one with the first filter and one with the 2nd, and stack them in a dashboard.

      My end user wants the lines in the same visual and axis, otherwise I'd be happy with the dashboard approach. Right now, though, I'd also like to know how to do this.

        • 1. Re: Filtering a dimension more than once for a dual axis
          Khang Pho

          Hi Kaushik,

           

          Try making a Parameter that is a Data Type String/List and add the values from Field.  Then make a calculated field like the following:

           

          IF [Measure] = [Parameter with Measure Values] THEN [Measure] ELSE "Everything Else" END

           

          At least from Tableau 9 the limitations to this would be you can only have the user select one value at a time.  The parameter will need to be refreshed if new values are added to your dimension.