2 Replies Latest reply on Aug 25, 2016 7:17 AM by Katie McCann

    Filter by a Filter?

    Katie McCann

      Hi,

       

      I have a task that is stumping me.

       

      I have some highway data the looks like this: (District, System, and Route are all dimensions)

       

      DistrictSystem
      Route
      LynchburgPrimaryUS-460E
      SalemInterstateI-81S
      StauntonPrimaryUS-11S
      SalemPrimaryUS-58W
      StauntonInterstateI-66E

       

      I want to filter in the the Primary Routes from Lynchburg and the Interstate Routes from Salem and Staunton (so filter out the Primary Routes from Salem & Staunton).  I feel like this shouldn't be that difficult but I am stumped.

       

      All I could thing was a calculated field that looked something like:

       

      if [district] = "lynchburg"

           then [system] = "primary"

      else [system] = "interstate"

      end

       

      But I know that won't work because we can't just redefine System like that.  But if I create a new field for System, won't it lose all the Routes that are associated with each system?

       

      I hope that I am just over thinking this.  Thanks!

        • 1. Re: Filter by a Filter?
          Tom W

          Create this as a calculated field and drag it to your filter shelf. It will have two options - true or false. Set it to true and you'll see only the combinations which evaluate to true

           

          ([District] = "Lynchburg" and [System] = "Primary') or ([District] = "Salem" and [System] = "Interstate")

           

          You could also achieve this by creating a combined field on district and system then dragging that combined field to the filters and selecting / deselecting.

          1 of 1 people found this helpful
          • 2. Re: Filter by a Filter?
            Katie McCann

            Thanks Tom, the calculated field worked perfectly!  I even figured out how to adapt to work for all nine districts in my dataset.